February 18, 2015

On 17.02.2015 20:41, Vadim Lopatin wrote:
> It looks like we need to develop some universal debugger library.
> For linux, it can use gdb as a backend.
> For windows - I'm not sure. Is there any console debugger which can
> debug dmd generated executables? I've checked windbg shipped with dmd,
> but it looks like it is GUI, and cannot be used as backend via console.
> Trying to play with my own implementation of debugger using win32 API.
>
> Probably there is already some debugger interface written in D?

On Windows, there is mago (https://github.com/rainers/mago), a debug engine that integrates with Visual Studio, but it's actually not limited to that. It might be rather complicated to host it, though, you'll have to interface with IDebugEngine2 and all its subclasses (https://msdn.microsoft.com/en-us/library/bb145310.aspx).

If you want a text interface, the Debugging Tools for Windows (https://msdn.microsoft.com/en-us/windows/hardware/hh852365) also contain cdb, a command line version of windbg (forget about the one distributed with dmd). For Win32, you'll have to convert the old CodeView debug info written by optlink to PDB format using cv2pdb, though.
February 18, 2015
On Wednesday, 18 February 2015 at 08:21:19 UTC, Rainer Schuetze wrote:
>
>
> On 17.02.2015 20:41, Vadim Lopatin wrote:
>> It looks like we need to develop some universal debugger library.
>> For linux, it can use gdb as a backend.
>> For windows - I'm not sure. Is there any console debugger which can
>> debug dmd generated executables? I've checked windbg shipped with dmd,
>> but it looks like it is GUI, and cannot be used as backend via console.
>> Trying to play with my own implementation of debugger using win32 API.
>>
>> Probably there is already some debugger interface written in D?
>
> On Windows, there is mago (https://github.com/rainers/mago), a debug engine that integrates with Visual Studio, but it's actually not limited to that. It might be rather complicated to host it, though, you'll have to interface with IDebugEngine2 and all its subclasses (https://msdn.microsoft.com/en-us/library/bb145310.aspx).
>
> If you want a text interface, the Debugging Tools for Windows (https://msdn.microsoft.com/en-us/windows/hardware/hh852365) also contain cdb, a command line version of windbg (forget about the one distributed with dmd). For Win32, you'll have to convert the old CodeView debug info written by optlink to PDB format using cv2pdb, though.

I'll check mago, thank you!
February 24, 2015
On Friday, 6 February 2015 at 14:03:07 UTC, Vadim Lopatin wrote:
> Hello,
>
> I'm working on cross-platform D language IDE - DlangIDE.
> It's written in D using DlangUI based GUI.
>
> Project on GitHub: https://github.com/buggins/dlangide
>

Project update:

Smart autoindents implemented for D source code editors.

So far, can be configured only manually in settings file:
~/.dlangide/settings.json:
{
    "editors": {
        "textEditor": {
            "useSpacesForTabs": true,
            "tabSize": 4,
            "smartIndents": true,
            "smartIndentsAfterPaste": true
        }
    },
    "interface": {
        "theme": "theme_default",
        "language": "en"
    }
}

Best regards,
    Vadim
February 26, 2015
On Wednesday, 18 February 2015 at 08:21:19 UTC, Rainer Schuetze wrote:
>
>
> On 17.02.2015 20:41, Vadim Lopatin wrote:
>> It looks like we need to develop some universal debugger library.
>> For linux, it can use gdb as a backend.
>> For windows - I'm not sure. Is there any console debugger which can
>> debug dmd generated executables? I've checked windbg shipped with dmd,
>> but it looks like it is GUI, and cannot be used as backend via console.
>> Trying to play with my own implementation of debugger using win32 API.
>>
>> Probably there is already some debugger interface written in D?
>
> On Windows, there is mago (https://github.com/rainers/mago), a debug engine that integrates with Visual Studio, but it's actually not limited to that. It might be rather complicated to host it, though, you'll have to interface with IDebugEngine2 and all its subclasses (https://msdn.microsoft.com/en-us/library/bb145310.aspx).
>
> If you want a text interface, the Debugging Tools for Windows (https://msdn.microsoft.com/en-us/windows/hardware/hh852365) also contain cdb, a command line version of windbg (forget about the one distributed with dmd). For Win32, you'll have to convert the old CodeView debug info written by optlink to PDB format using cv2pdb, though.

Trying to integrate MAGO.
I can easy create instance of MAGO DebugEngine, but having problems with obtaining of IDebugPort which is needed for invoking of LaunchSuspended.
It looks like to get IDebugPort, I need IDebugCoreServer2 instance.
Does anybody know how to do it?

Best regards,
    Vadim
February 26, 2015
On Friday, 6 February 2015 at 14:03:07 UTC, Vadim Lopatin wrote:
> Hello,
>
> I'm working on cross-platform D language IDE - DlangIDE.
> It's written in D using DlangUI based GUI.
>
> Project on GitHub: https://github.com/buggins/dlangide
>


Recent changes:


Package dependencies are now visible in workspace tree.

When DUB project is being loaded, all DUB dependency packages are being loaded into workspace tree too.
Now it's possible to use GoToDefinition and autocompletion using dependencies.

Limitation: so far dependency list is being read from file dub.selections.json on project loading.
If dub build was never executed, try run build or dub Upgrade Dependencies, and then reload workspace.

February 28, 2015

On 26.02.2015 11:17, Vadim Lopatin wrote:
> On Wednesday, 18 February 2015 at 08:21:19 UTC, Rainer Schuetze wrote:
>>
>>
>> On 17.02.2015 20:41, Vadim Lopatin wrote:
>>> It looks like we need to develop some universal debugger library.
>>> For linux, it can use gdb as a backend.
>>> For windows - I'm not sure. Is there any console debugger which can
>>> debug dmd generated executables? I've checked windbg shipped with dmd,
>>> but it looks like it is GUI, and cannot be used as backend via console.
>>> Trying to play with my own implementation of debugger using win32 API.
>>>
>>> Probably there is already some debugger interface written in D?
>>
>> On Windows, there is mago (https://github.com/rainers/mago), a debug
>> engine that integrates with Visual Studio, but it's actually not
>> limited to that. It might be rather complicated to host it, though,
>> you'll have to interface with IDebugEngine2 and all its subclasses
>> (https://msdn.microsoft.com/en-us/library/bb145310.aspx).
>>
>> If you want a text interface, the Debugging Tools for Windows
>> (https://msdn.microsoft.com/en-us/windows/hardware/hh852365) also
>> contain cdb, a command line version of windbg (forget about the one
>> distributed with dmd). For Win32, you'll have to convert the old
>> CodeView debug info written by optlink to PDB format using cv2pdb,
>> though.
>
> Trying to integrate MAGO.
> I can easy create instance of MAGO DebugEngine, but having problems with
> obtaining of IDebugPort which is needed for invoking of LaunchSuspended.
> It looks like to get IDebugPort, I need IDebugCoreServer2 instance.
> Does anybody know how to do it?

I suspect that is implemented by the Visual Studio debugger. Have you tried creating an IDebugPortSupplier2?
https://msdn.microsoft.com/en-us/library/bb145819.aspx

It might also only be possible from within Visual Studio, though. To host a debug engine you might have to implement these yourself...
February 28, 2015
On Saturday, 28 February 2015 at 08:06:59 UTC, Rainer Schuetze wrote:
>
>
> On 26.02.2015 11:17, Vadim Lopatin wrote:
>> On Wednesday, 18 February 2015 at 08:21:19 UTC, Rainer Schuetze wrote:
>>>
>>>
>>> On 17.02.2015 20:41, Vadim Lopatin wrote:
>>>> It looks like we need to develop some universal debugger library.
>>>> For linux, it can use gdb as a backend.
>>>> For windows - I'm not sure. Is there any console debugger which can
>>>> debug dmd generated executables? I've checked windbg shipped with dmd,
>>>> but it looks like it is GUI, and cannot be used as backend via console.
>>>> Trying to play with my own implementation of debugger using win32 API.
>>>>
>>>> Probably there is already some debugger interface written in D?
>>>
>>> On Windows, there is mago (https://github.com/rainers/mago), a debug
>>> engine that integrates with Visual Studio, but it's actually not
>>> limited to that. It might be rather complicated to host it, though,
>>> you'll have to interface with IDebugEngine2 and all its subclasses
>>> (https://msdn.microsoft.com/en-us/library/bb145310.aspx).
>>>
>>> If you want a text interface, the Debugging Tools for Windows
>>> (https://msdn.microsoft.com/en-us/windows/hardware/hh852365) also
>>> contain cdb, a command line version of windbg (forget about the one
>>> distributed with dmd). For Win32, you'll have to convert the old
>>> CodeView debug info written by optlink to PDB format using cv2pdb,
>>> though.
>>
>> Trying to integrate MAGO.
>> I can easy create instance of MAGO DebugEngine, but having problems with
>> obtaining of IDebugPort which is needed for invoking of LaunchSuspended.
>> It looks like to get IDebugPort, I need IDebugCoreServer2 instance.
>> Does anybody know how to do it?
>
> I suspect that is implemented by the Visual Studio debugger. Have you tried creating an IDebugPortSupplier2?
> https://msdn.microsoft.com/en-us/library/bb145819.aspx
>
> It might also only be possible from within Visual Studio, though. To host a debug engine you might have to implement these yourself...

To create IDebugPortSupplier2, I need at least GUID for class implementing it.

March 01, 2015

On 28.02.2015 10:50, Vadim Lopatin wrote:
>>
>> I suspect that is implemented by the Visual Studio debugger. Have you
>> tried creating an IDebugPortSupplier2?
>> https://msdn.microsoft.com/en-us/library/bb145819.aspx
>>
>> It might also only be possible from within Visual Studio, though. To
>> host a debug engine you might have to implement these yourself...
>
> To create IDebugPortSupplier2, I need at least GUID for class
> implementing it.

You can find some in the registry, e.g.: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\AD7Metrics\Engine\{3B476D35-A401-11D2-AAD4-00C04F990171}\PortSupplier

I guess you can only create them while running inside Visual Studio, so that might not really help any further...
March 02, 2015
On Sunday, 1 March 2015 at 10:16:32 UTC, Rainer Schuetze wrote:
>
>
> On 28.02.2015 10:50, Vadim Lopatin wrote:
>>>
>>> I suspect that is implemented by the Visual Studio debugger. Have you
>>> tried creating an IDebugPortSupplier2?
>>> https://msdn.microsoft.com/en-us/library/bb145819.aspx
>>>
>>> It might also only be possible from within Visual Studio, though. To
>>> host a debug engine you might have to implement these yourself...
>>
>> To create IDebugPortSupplier2, I need at least GUID for class
>> implementing it.
>
> You can find some in the registry, e.g.: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\AD7Metrics\Engine\{3B476D35-A401-11D2-AAD4-00C04F990171}\PortSupplier
>
> I guess you can only create them while running inside Visual Studio, so that might not really help any further...
Tried several CLSIDs from registry, but always getting REGDB_E_CLASSNOTREG

March 03, 2015
On Monday, 2 March 2015 at 10:28:54 UTC, Vadim Lopatin wrote:
> On Sunday, 1 March 2015 at 10:16:32 UTC, Rainer Schuetze wrote:
>>
>>
>> On 28.02.2015 10:50, Vadim Lopatin wrote:
>>>>
>>>> I suspect that is implemented by the Visual Studio debugger. Have you
>>>> tried creating an IDebugPortSupplier2?
>>>> https://msdn.microsoft.com/en-us/library/bb145819.aspx
>>>>
>>>> It might also only be possible from within Visual Studio, though. To
>>>> host a debug engine you might have to implement these yourself...
>>>
>>> To create IDebugPortSupplier2, I need at least GUID for class
>>> implementing it.
>>
>> You can find some in the registry, e.g.: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\AD7Metrics\Engine\{3B476D35-A401-11D2-AAD4-00C04F990171}\PortSupplier
>>
>> I guess you can only create them while running inside Visual Studio, so that might not really help any further...
> Tried several CLSIDs from registry, but always getting REGDB_E_CLASSNOTREG

Trying to use same approach as in MagoWrapper as suggested by michaelc37
http://forum.dlang.org/thread/mchmzlgdnzmcgwiticwh@forum.dlang.org#post-zeqckcayqzkpsfxhznlz:40forum.dlang.org