Skip to content
Rainer Schuetze edited this page Dec 1, 2012 · 2 revisions

Table of Contents

Debugging

Thanks to cv2pdb, debugging in Visual Studio integrates well. Here is an example debugging session

Using cv2pdb has a few quirks, like displaying '@' instead of '.'. This is happening because the C++ debugger that comes with Visual Studio is used.

Exceptions

As of version 0.3.21, the installer adds an entry "D Exception" to the list of Win32 exceptions that can be found in the Debug->Exceptions dialog. This allows the debugger to stop execution when an exception is thrown by the debuggee. With earlier versions, you'll have to add an entry with code 0xE0440001 yourself.

Mago Debugger

As of version 0.3.16 Visual D comes with the option to install the Mago debugger. This debug engine is dedicated to the D programming language and avoids the work-arounds needed when using the native debug engine. It also features D specific expressions like dynamic array slicing.

To enable debugging with the Mago debugger select it on the project conifguration page "Debugging". This will also disable cv2pdb conversion as Mago directly operates on the debug info emitted by DMD.

Please note that Mago is under development and might lack a few features that you find in the native debugger.

Exceptions

Mago displays exceptions thrown by the debuggee in the output window. You can also stop execution by enabling the respective box in the Debug->Exception dialog. Due to a bug, you currently cannot simply enable the "D Exceptions" entry, but must select the specific exceptions while keeping the "D Exceptions" entry unchecked. So, the dialog should look something like this:

Clone this wiki locally