www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Debugger with source code display

reply "Andreas Schmid" <monkey gmx.info> writes:
I'm in desperate need of a debugger for Windows that displays the original 
source code and lets me step through it. Is there anything like that?

-Andreas 
Apr 27 2005
next sibling parent clayasaurus <clayasaurus gmail.com> writes:
Andreas Schmid wrote:
 I'm in desperate need of a debugger for Windows that displays the original 
 source code and lets me step through it. Is there anything like that?
 
 -Andreas 
 
 
cygwin's xemacs and gdc? Never tried it, but I don't see why it can't work.
Apr 27 2005
prev sibling next sibling parent reply "Maxime Larose" <mlarose broadsoft.com> writes:
MSVC++ does it for me. I even have a very old version... (dated 1998 I
think)

Max



"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the original
 source code and lets me step through it. Is there anything like that?

 -Andreas
Apr 27 2005
parent reply "Andreas Schmid" <monkey gmx.info> writes:
Which version do you have? Are there any instructions on how to generate the 
correct debug info and load the source code + .obj file in VC++?

Does it display the D source code correctly, or only parts of it?

-Andreas

"Maxime Larose" <mlarose broadsoft.com> wrote in message 
news:d4obbc$1bva$1 digitaldaemon.com...
 MSVC++ does it for me. I even have a very old version... (dated 1998 I
 think)

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the 
 original
 source code and lets me step through it. Is there anything like that?

 -Andreas
Apr 27 2005
next sibling parent "Andrew Fedoniouk" <news terrainformatica.com> writes:
 Does it display the D source code correctly, or only parts of it?
What do you mean by that exactly? It does not show sometimes template instantiations, in other cases it just works. WinDbg.exe is also an option.
Apr 27 2005
prev sibling parent reply "Maxime Larose" <mlarose broadsoft.com> writes:
About the source code, I'm not sure what you mean... you add files to your
VC++ project and they show up if you double-click them...  I have VC++
version 6.0.

The correct debug info is generated automatically with: dmd -debug -g  (I
personally use build; it works too).

If you right-click on a source file, you can set its properties. Since D
files are non-C(++), they have a "Custom Build" sheet. In the "output"
field, put in the name of the .obj file (and directory). VC++ will make the
link between the source file and that .obj, and you can then set
breakpoints, step through the code, see the disassembly, etc... Like you
would with any normal C++ source file.

It all works seamlessly... Again the only issue I have seen is that
sometimes VC++ will have problems with templates. In these cases, I usually
"de-templatize" the code, debug it, and the re-template it again.

Hope this helps,

Max



"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4ofdk$1fts$1 digitaldaemon.com...
 Which version do you have? Are there any instructions on how to generate
the
 correct debug info and load the source code + .obj file in VC++?

 Does it display the D source code correctly, or only parts of it?

 -Andreas

 "Maxime Larose" <mlarose broadsoft.com> wrote in message
 news:d4obbc$1bva$1 digitaldaemon.com...
 MSVC++ does it for me. I even have a very old version... (dated 1998 I
 think)

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the
 original
 source code and lets me step through it. Is there anything like that?

 -Andreas
Apr 27 2005
next sibling parent reply zwang <nehzgnaw gmail.com> writes:
Does anyone know an easy way to display the values of class members or
elements of array/associative array in VC++?


Maxime Larose wrote:
 About the source code, I'm not sure what you mean... you add files to your
 VC++ project and they show up if you double-click them...  I have VC++
 version 6.0.
 
 The correct debug info is generated automatically with: dmd -debug -g  (I
 personally use build; it works too).
 
 If you right-click on a source file, you can set its properties. Since D
 files are non-C(++), they have a "Custom Build" sheet. In the "output"
 field, put in the name of the .obj file (and directory). VC++ will make the
 link between the source file and that .obj, and you can then set
 breakpoints, step through the code, see the disassembly, etc... Like you
 would with any normal C++ source file.
 
 It all works seamlessly... Again the only issue I have seen is that
 sometimes VC++ will have problems with templates. In these cases, I usually
 "de-templatize" the code, debug it, and the re-template it again.
 
 Hope this helps,
 
 Max
 
 
 
 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4ofdk$1fts$1 digitaldaemon.com...
 
Which version do you have? Are there any instructions on how to generate
the
correct debug info and load the source code + .obj file in VC++?

Does it display the D source code correctly, or only parts of it?

-Andreas

"Maxime Larose" <mlarose broadsoft.com> wrote in message
news:d4obbc$1bva$1 digitaldaemon.com...

MSVC++ does it for me. I even have a very old version... (dated 1998 I
think)

Max



"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4o8jg$191t$1 digitaldaemon.com...

I'm in desperate need of a debugger for Windows that displays the
original
source code and lets me step through it. Is there anything like that?

-Andreas
Apr 27 2005
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"zwang" <nehzgnaw gmail.com> wrote in message 
news:d4olb3$1lt5$1 digitaldaemon.com...
 Does anyone know an easy way to display the values of class members or
 elements of array/associative array in VC++?
Doubt it could be done without reverse engineering the VC++ debugger. The ABIs for D and C++ are different, and the debugger is probably hardcoded to access C++ classes/arrays.
Apr 27 2005
prev sibling parent reply "Andreas Schmid" <monkey gmx.info> writes:
Thanks for the detailed instructions!

-Andreas

"Maxime Larose" <mlarose broadsoft.com> wrote in message 
news:d4oif6$1it6$1 digitaldaemon.com...
 About the source code, I'm not sure what you mean... you add files to your
 VC++ project and they show up if you double-click them...  I have VC++
 version 6.0.

 The correct debug info is generated automatically with: dmd -debug -g  (I
 personally use build; it works too).

 If you right-click on a source file, you can set its properties. Since D
 files are non-C(++), they have a "Custom Build" sheet. In the "output"
 field, put in the name of the .obj file (and directory). VC++ will make 
 the
 link between the source file and that .obj, and you can then set
 breakpoints, step through the code, see the disassembly, etc... Like you
 would with any normal C++ source file.

 It all works seamlessly... Again the only issue I have seen is that
 sometimes VC++ will have problems with templates. In these cases, I 
 usually
 "de-templatize" the code, debug it, and the re-template it again.

 Hope this helps,

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4ofdk$1fts$1 digitaldaemon.com...
 Which version do you have? Are there any instructions on how to generate
the
 correct debug info and load the source code + .obj file in VC++?

 Does it display the D source code correctly, or only parts of it?

 -Andreas

 "Maxime Larose" <mlarose broadsoft.com> wrote in message
 news:d4obbc$1bva$1 digitaldaemon.com...
 MSVC++ does it for me. I even have a very old version... (dated 1998 I
 think)

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the
 original
 source code and lets me step through it. Is there anything like that?

 -Andreas
Apr 28 2005
parent reply "Andreas Schmid" <monkey gmx.info> writes:
I compiled a simple "Hello world"-app using "dmd -g Hello.d", then opened 
WinDbg, selected "Hello.exe" and also opened "Hello.d" as the src code 
file - then I tried adding a breakpoint and it displayed a notice that it 
couldn't find the symbols and could continue to look for them.

Hitting "Yes" adds the breakpoint and allows me to step through the source 
code. I added a simple for-loop to it and tried adding the loop's "i" 
variable to the "Watches"-window - without success.

Is it possible to "watch" D variables using Windbg?

-Andreas

"Andreas Schmid" <monkey gmx.info> wrote in message 
news:d4qj4k$k9q$1 digitaldaemon.com...
 Thanks for the detailed instructions!

 -Andreas

 "Maxime Larose" <mlarose broadsoft.com> wrote in message 
 news:d4oif6$1it6$1 digitaldaemon.com...
 About the source code, I'm not sure what you mean... you add files to 
 your
 VC++ project and they show up if you double-click them...  I have VC++
 version 6.0.

 The correct debug info is generated automatically with: dmd -debug -g  (I
 personally use build; it works too).

 If you right-click on a source file, you can set its properties. Since D
 files are non-C(++), they have a "Custom Build" sheet. In the "output"
 field, put in the name of the .obj file (and directory). VC++ will make 
 the
 link between the source file and that .obj, and you can then set
 breakpoints, step through the code, see the disassembly, etc... Like you
 would with any normal C++ source file.

 It all works seamlessly... Again the only issue I have seen is that
 sometimes VC++ will have problems with templates. In these cases, I 
 usually
 "de-templatize" the code, debug it, and the re-template it again.

 Hope this helps,

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4ofdk$1fts$1 digitaldaemon.com...
 Which version do you have? Are there any instructions on how to generate
the
 correct debug info and load the source code + .obj file in VC++?

 Does it display the D source code correctly, or only parts of it?

 -Andreas

 "Maxime Larose" <mlarose broadsoft.com> wrote in message
 news:d4obbc$1bva$1 digitaldaemon.com...
 MSVC++ does it for me. I even have a very old version... (dated 1998 I
 think)

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the
 original
 source code and lets me step through it. Is there anything like that?

 -Andreas
Apr 28 2005
parent reply "Maxime Larose" <mlarose broadsoft.com> writes:
You must specify Hello.obj as the object file... somewhere in WinDbg. (Never
used WinDbg myself so I wouldn't know where.)

If you don't specify the .obj, how can the debugger know where the symbols
are?  It doesn't know what a .d file is, so it will not look for Hello.obj
(like it would for a .cpp file).

Max


"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4qm3t$n5c$1 digitaldaemon.com...
 I compiled a simple "Hello world"-app using "dmd -g Hello.d", then opened
 WinDbg, selected "Hello.exe" and also opened "Hello.d" as the src code
 file - then I tried adding a breakpoint and it displayed a notice that it
 couldn't find the symbols and could continue to look for them.

 Hitting "Yes" adds the breakpoint and allows me to step through the source
 code. I added a simple for-loop to it and tried adding the loop's "i"
 variable to the "Watches"-window - without success.

 Is it possible to "watch" D variables using Windbg?

 -Andreas

 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4qj4k$k9q$1 digitaldaemon.com...
 Thanks for the detailed instructions!

 -Andreas

 "Maxime Larose" <mlarose broadsoft.com> wrote in message
 news:d4oif6$1it6$1 digitaldaemon.com...
 About the source code, I'm not sure what you mean... you add files to
 your
 VC++ project and they show up if you double-click them...  I have VC++
 version 6.0.

 The correct debug info is generated automatically with: dmd -debug -g
(I
 personally use build; it works too).

 If you right-click on a source file, you can set its properties. Since
D
 files are non-C(++), they have a "Custom Build" sheet. In the "output"
 field, put in the name of the .obj file (and directory). VC++ will make
 the
 link between the source file and that .obj, and you can then set
 breakpoints, step through the code, see the disassembly, etc... Like
you
 would with any normal C++ source file.

 It all works seamlessly... Again the only issue I have seen is that
 sometimes VC++ will have problems with templates. In these cases, I
 usually
 "de-templatize" the code, debug it, and the re-template it again.

 Hope this helps,

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4ofdk$1fts$1 digitaldaemon.com...
 Which version do you have? Are there any instructions on how to
generate
 the
 correct debug info and load the source code + .obj file in VC++?

 Does it display the D source code correctly, or only parts of it?

 -Andreas

 "Maxime Larose" <mlarose broadsoft.com> wrote in message
 news:d4obbc$1bva$1 digitaldaemon.com...
 MSVC++ does it for me. I even have a very old version... (dated 1998
I
 think)

 Max



 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the
 original
 source code and lets me step through it. Is there anything like
that?
 -Andreas
Apr 28 2005
parent reply zwang <nehzgnaw gmail.com> writes:
WinDbg expects .pdb symbol files, not object files.

Maxime Larose wrote:
 You must specify Hello.obj as the object file... somewhere in WinDbg. (Never
 used WinDbg myself so I wouldn't know where.)
 
 If you don't specify the .obj, how can the debugger know where the symbols
 are?  It doesn't know what a .d file is, so it will not look for Hello.obj
 (like it would for a .cpp file).
 
 Max
 
 
 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d4qm3t$n5c$1 digitaldaemon.com...
 
I compiled a simple "Hello world"-app using "dmd -g Hello.d", then opened
WinDbg, selected "Hello.exe" and also opened "Hello.d" as the src code
file - then I tried adding a breakpoint and it displayed a notice that it
couldn't find the symbols and could continue to look for them.

Hitting "Yes" adds the breakpoint and allows me to step through the source
code. I added a simple for-loop to it and tried adding the loop's "i"
variable to the "Watches"-window - without success.

Is it possible to "watch" D variables using Windbg?

-Andreas

"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4qj4k$k9q$1 digitaldaemon.com...

Thanks for the detailed instructions!

-Andreas

"Maxime Larose" <mlarose broadsoft.com> wrote in message
news:d4oif6$1it6$1 digitaldaemon.com...

About the source code, I'm not sure what you mean... you add files to
your
VC++ project and they show up if you double-click them...  I have VC++
version 6.0.

The correct debug info is generated automatically with: dmd -debug -g
(I
personally use build; it works too).

If you right-click on a source file, you can set its properties. Since
D
files are non-C(++), they have a "Custom Build" sheet. In the "output"
field, put in the name of the .obj file (and directory). VC++ will make
the
link between the source file and that .obj, and you can then set
breakpoints, step through the code, see the disassembly, etc... Like
you
would with any normal C++ source file.

It all works seamlessly... Again the only issue I have seen is that
sometimes VC++ will have problems with templates. In these cases, I
usually
"de-templatize" the code, debug it, and the re-template it again.

Hope this helps,

Max



"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4ofdk$1fts$1 digitaldaemon.com...

Which version do you have? Are there any instructions on how to
generate
the

correct debug info and load the source code + .obj file in VC++?

Does it display the D source code correctly, or only parts of it?

-Andreas

"Maxime Larose" <mlarose broadsoft.com> wrote in message
news:d4obbc$1bva$1 digitaldaemon.com...

MSVC++ does it for me. I even have a very old version... (dated 1998
I
think)

Max



"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4o8jg$191t$1 digitaldaemon.com...

I'm in desperate need of a debugger for Windows that displays the
original
source code and lets me step through it. Is there anything like
that?
-Andreas
Apr 28 2005
parent reply "Walter" <newshound digitalmars.com> writes:
"zwang" <nehzgnaw gmail.com> wrote in message
news:d4qq7a$rfv$1 digitaldaemon.com...
 WinDbg expects .pdb symbol files, not object files.

 Maxime Larose wrote:
 You must specify Hello.obj as the object file... somewhere in WinDbg.
(Never
 used WinDbg myself so I wouldn't know where.)

 If you don't specify the .obj, how can the debugger know where the
symbols
 are?  It doesn't know what a .d file is, so it will not look for
Hello.obj
 (like it would for a .cpp file).
The windbg.exe that comes on the Digital Mars CD works fine with nothing more than: dmd foo -g windbg foo.exe When the main window opens, use the command: g _Dmain and it'll run to the start of main(). '_Dmain' is the mangled version of D's main, since windbg doesn't know about D name mangling. You can then step through the source using F10.
Apr 28 2005
next sibling parent reply "Maxime Larose" <mlarose broadsoft.com> writes:
Walter,

Talking about name mangling, I want to have names unmangled for stack
traces.

The function you use is a C function called unmangle_ident. Problem is, it
doesn't work. The source is not available. I stepped through the assembly
and it seems to want a name starting with "?". Anyway, not quite sure but
the fact is that even stopping with the debugger when the same method is
called by the profiling functions (something_pro_n...) returns the same
result, i.e. nothing is done and the name is still mangled. Looking at the
profiler output confirms this.

How course, I could check out the mangling functions and do the reverse, but
I'd much rather use something already available. Is there such a function
available?

Thanks,

Max





"Walter" <newshound digitalmars.com> wrote in message
news:d4r5j7$19bl$1 digitaldaemon.com...
 "zwang" <nehzgnaw gmail.com> wrote in message
 news:d4qq7a$rfv$1 digitaldaemon.com...
 WinDbg expects .pdb symbol files, not object files.

 Maxime Larose wrote:
 You must specify Hello.obj as the object file... somewhere in WinDbg.
(Never
 used WinDbg myself so I wouldn't know where.)

 If you don't specify the .obj, how can the debugger know where the
symbols
 are?  It doesn't know what a .d file is, so it will not look for
Hello.obj
 (like it would for a .cpp file).
The windbg.exe that comes on the Digital Mars CD works fine with nothing more than: dmd foo -g windbg foo.exe When the main window opens, use the command: g _Dmain and it'll run to the start of main(). '_Dmain' is the mangled version of
D's
 main, since windbg doesn't know about D name mangling.

 You can then step through the source using F10.
Apr 28 2005
parent "Walter" <newshound digitalmars.com> writes:
unmangle_ident's source comes with the Digital Mars CD, but it only
unmangles C++ identifiers. I haven't written one for D yet.

"Maxime Larose" <mlarose broadsoft.com> wrote in message
news:d4r75j$1b3v$1 digitaldaemon.com...
 Walter,

 Talking about name mangling, I want to have names unmangled for stack
 traces.

 The function you use is a C function called unmangle_ident. Problem is, it
 doesn't work. The source is not available. I stepped through the assembly
 and it seems to want a name starting with "?". Anyway, not quite sure but
 the fact is that even stopping with the debugger when the same method is
 called by the profiling functions (something_pro_n...) returns the same
 result, i.e. nothing is done and the name is still mangled. Looking at the
 profiler output confirms this.

 How course, I could check out the mangling functions and do the reverse,
but
 I'd much rather use something already available. Is there such a function
 available?
Apr 28 2005
prev sibling parent reply zwang <nehzgnaw gmail.com> writes:
Walter wrote:
<snip>
 The windbg.exe that comes on the Digital Mars CD works fine with nothing
 more than:
 
 dmd foo -g
 windbg foo.exe
 
 When the main window opens, use the command:
 
     g _Dmain
 
 and it'll run to the start of main(). '_Dmain' is the mangled version of D's
 main, since windbg doesn't know about D name mangling.
 
 You can then step through the source using F10.
 
 
I can step through the code using windbg without a problem. The problem is that no local variables are resolved without a .pdb file, and I can't inspect any value in the "Watch" window.
Apr 28 2005
parent reply "Walter" <newshound digitalmars.com> writes:
"zwang" <nehzgnaw gmail.com> wrote in message
news:d4rvhm$24gn$1 digitaldaemon.com...
 I can step through the code using windbg without a problem. The problem is
that
 no local variables are resolved without a .pdb file, and I can't inspect
any
 value in the "Watch" window.
I use windbg.exe 5.1, and doing a "locals" window shows them just fine. There's no .pdb file.
Apr 29 2005
next sibling parent reply "Ben Hinkle" <ben.hinkle gmail.com> writes:
"Walter" <newshound digitalmars.com> wrote in message 
news:d4spqt$28e$1 digitaldaemon.com...
 "zwang" <nehzgnaw gmail.com> wrote in message
 news:d4rvhm$24gn$1 digitaldaemon.com...
 I can step through the code using windbg without a problem. The problem 
 is
that
 no local variables are resolved without a .pdb file, and I can't inspect
any
 value in the "Watch" window.
I use windbg.exe 5.1, and doing a "locals" window shows them just fine. There's no .pdb file.
Funny, like zwang I've never gotten any locals either. I'm also using 5.1 and compiling with -g. I get stack traces and can step through code but that's it.
Apr 29 2005
parent reply "Walter" <newshound digitalmars.com> writes:
"Ben Hinkle" <ben.hinkle gmail.com> wrote in message
news:d4t9f3$np4$1 digitaldaemon.com...
 "Walter" <newshound digitalmars.com> wrote in message
 news:d4spqt$28e$1 digitaldaemon.com...
 "zwang" <nehzgnaw gmail.com> wrote in message
 news:d4rvhm$24gn$1 digitaldaemon.com...
 I can step through the code using windbg without a problem. The problem
 is
that
 no local variables are resolved without a .pdb file, and I can't
inspect
 any
 value in the "Watch" window.
I use windbg.exe 5.1, and doing a "locals" window shows them just fine. There's no .pdb file.
Funny, like zwang I've never gotten any locals either. I'm also using 5.1 and compiling with -g. I get stack traces and can step through code but that's it.
Try using the windbg.exe that comes on the Digital Mars CD.
Apr 29 2005
next sibling parent reply Derek Parnell <derek psych.ward> writes:
On Fri, 29 Apr 2005 14:12:23 -0700, Walter wrote:

 Try using the windbg.exe that comes on the Digital Mars CD.
Are you saying that the CD windbg.exe is different to the one distributed by Microsoft? -- Derek Parnell Melbourne, Australia 30/04/2005 10:20:33 AM
Apr 29 2005
next sibling parent reply "Walter" <newshound digitalmars.com> writes:
"Derek Parnell" <derek psych.ward> wrote in message
news:p2dioncv1dp2.v3yv2de6beka.dlg 40tude.net...
 On Fri, 29 Apr 2005 14:12:23 -0700, Walter wrote:

 Try using the windbg.exe that comes on the Digital Mars CD.
Are you saying that the CD windbg.exe is different to the one distributed by Microsoft?
The one on the CD is: 08/08/1996 08:30 PM 559,888 WINDBG.EXE which is Microsoft's one. However, based on the information in this thread, Microsoft has likely changed it to the point where it won't work anymore with Microsoft Codeview 4 symbolic debug info. I've stuck with CV4 format because it's the last one that Microsoft officially documented.
Apr 29 2005
parent Derek Parnell <derek psych.ward> writes:
On Fri, 29 Apr 2005 17:58:54 -0700, Walter wrote:

 "Derek Parnell" <derek psych.ward> wrote in message
 news:p2dioncv1dp2.v3yv2de6beka.dlg 40tude.net...
 On Fri, 29 Apr 2005 14:12:23 -0700, Walter wrote:

 Try using the windbg.exe that comes on the Digital Mars CD.
Are you saying that the CD windbg.exe is different to the one distributed by Microsoft?
The one on the CD is: 08/08/1996 08:30 PM 559,888 WINDBG.EXE which is Microsoft's one. However, based on the information in this thread, Microsoft has likely changed it to the point where it won't work anymore with Microsoft Codeview 4 symbolic debug info. I've stuck with CV4 format because it's the last one that Microsoft officially documented.
Yep, yours is a different one. The current version is dated 18/May/2004 and is 343KB long. Don't suppose you could make your edition available for free? -- Derek Parnell Melbourne, Australia 30/04/2005 11:10:57 AM
Apr 29 2005
prev sibling parent reply Martin Boeker <martin.boeker uniklinik-freiburg.de> writes:
I think, the one on the CD is an old windbg (perhaps version 5.1 from 
about 1998?) which is not easy to obtain today. I could not find such an 
old version of this ms tool (in an 4h search) - and wouldn't buy the D 
CD for $45 only to get this buggy (so has been written) ms tool; today 
they only distribute some 6.x versions over their webpage (which only 
understand pdb).

BUT: I checked the open-watcom tools distributed with a graphical 
debugger which works fine for D (http://www.openwatcom.org/). The 
complete package comes with a debugger and several other tools as a 64Mb 
download. Having a good debugger is an important feature for D so I 
think I should hind to this probably "competitive" piece of software. 
Perhaps, there will be a more D way of debugging in the future ;-) .

You can debug /without/ graphical code interaction but /with/ the 
possibility to set breakpoints on functions (use the module window 
clicking right on modules) and variable assignments (use the locale 
window clicking right on symbols) and so on ... I think it is not 
possible to graphically interact with the code because of mangling but 
it is convenient to step in the assembler window. The graphical debugger 
is the "wdw.exe" in the binnt directory.

BUT: the gdb command line debugger under Cygwin seems to be the best 
debugger for windows D development. Unfortunately, -- but hopefully soon 
-- the new gcd (gdc 0.11 ^= dmd 0.121) has not been "integrated" in the 
Cygwin distribution (it is a major operation to recompile gcc from 
source under Cygwin). I think (hope) the maintainers will make it for us 
available soon.

Martin

Derek Parnell wrote:
 On Fri, 29 Apr 2005 14:12:23 -0700, Walter wrote:
 
 
Try using the windbg.exe that comes on the Digital Mars CD.
Are you saying that the CD windbg.exe is different to the one distributed by Microsoft?
Apr 29 2005
parent reply Martin Boeker <martin.boeker uniklinik-freiburg.de> writes:
The watcom debugger described in my former mail does not interact with 
the code but the correct code line numbers are displayed in the source 
window so you can set break points on line numbers (where the watcom dbg 
says "Unable to open source file") with the assistance of an external 
editor.

With observing locales and "watches" I think this is quite a complete 
debugger for D.

Martin

Martin Boeker wrote:
 I think, the one on the CD is an old windbg (perhaps version 5.1 from 
 about 1998?) which is not easy to obtain today. I could not find such an 
 old version of this ms tool (in an 4h search) - and wouldn't buy the D 
 CD for $45 only to get this buggy (so has been written) ms tool; today 
 they only distribute some 6.x versions over their webpage (which only 
 understand pdb).
 
 BUT: I checked the open-watcom tools distributed with a graphical 
 debugger which works fine for D (http://www.openwatcom.org/). The 
 complete package comes with a debugger and several other tools as a 64Mb 
 download. Having a good debugger is an important feature for D so I 
 think I should hind to this probably "competitive" piece of software. 
 Perhaps, there will be a more D way of debugging in the future ;-) .
 
 You can debug /without/ graphical code interaction but /with/ the 
 possibility to set breakpoints on functions (use the module window 
 clicking right on modules) and variable assignments (use the locale 
 window clicking right on symbols) and so on ... I think it is not 
 possible to graphically interact with the code because of mangling but 
 it is convenient to step in the assembler window. The graphical debugger 
 is the "wdw.exe" in the binnt directory.
 
 BUT: the gdb command line debugger under Cygwin seems to be the best 
 debugger for windows D development. Unfortunately, -- but hopefully soon 
 -- the new gcd (gdc 0.11 ^= dmd 0.121) has not been "integrated" in the 
 Cygwin distribution (it is a major operation to recompile gcc from 
 source under Cygwin). I think (hope) the maintainers will make it for us 
 available soon.
 
 Martin
 
 Derek Parnell wrote:
 
 On Fri, 29 Apr 2005 14:12:23 -0700, Walter wrote:


 Try using the windbg.exe that comes on the Digital Mars CD.
Are you saying that the CD windbg.exe is different to the one distributed by Microsoft?
Apr 29 2005
parent Martin Boeker <martin.boeker uniklinik-freiburg.de> writes:
Code is displayed in the debugger source window if the source path is 
correctly set in the file dialog. It has to be set to the directory 
which holds the D files (can't be done in the dialogue "browse" which 
selects single files).

Martin

Martin Boeker wrote:
 The watcom debugger described in my former mail does not interact with 
 the code but the correct code line numbers are displayed in the source 
 window so you can set break points on line numbers (where the watcom dbg 
 says "Unable to open source file") with the assistance of an external 
 editor.
 
 With observing locales and "watches" I think this is quite a complete 
 debugger for D.
 
 Martin
 
 Martin Boeker wrote:
 
 I think, the one on the CD is an old windbg (perhaps version 5.1 from 
 about 1998?) which is not easy to obtain today. I could not find such 
 an old version of this ms tool (in an 4h search) - and wouldn't buy 
 the D CD for $45 only to get this buggy (so has been written) ms tool; 
 today they only distribute some 6.x versions over their webpage (which 
 only understand pdb).

 BUT: I checked the open-watcom tools distributed with a graphical 
 debugger which works fine for D (http://www.openwatcom.org/). The 
 complete package comes with a debugger and several other tools as a 
 64Mb download. Having a good debugger is an important feature for D so 
 I think I should hind to this probably "competitive" piece of 
 software. Perhaps, there will be a more D way of debugging in the 
 future ;-) .

 You can debug /without/ graphical code interaction but /with/ the 
 possibility to set breakpoints on functions (use the module window 
 clicking right on modules) and variable assignments (use the locale 
 window clicking right on symbols) and so on ... I think it is not 
 possible to graphically interact with the code because of mangling but 
 it is convenient to step in the assembler window. The graphical 
 debugger is the "wdw.exe" in the binnt directory.

 BUT: the gdb command line debugger under Cygwin seems to be the best 
 debugger for windows D development. Unfortunately, -- but hopefully 
 soon -- the new gcd (gdc 0.11 ^= dmd 0.121) has not been "integrated" 
 in the Cygwin distribution (it is a major operation to recompile gcc 
 from source under Cygwin). I think (hope) the maintainers will make it 
 for us available soon.

 Martin

 Derek Parnell wrote:

 On Fri, 29 Apr 2005 14:12:23 -0700, Walter wrote:


 Try using the windbg.exe that comes on the Digital Mars CD.
Are you saying that the CD windbg.exe is different to the one distributed by Microsoft?
Apr 30 2005
prev sibling parent "Ben Hinkle" <ben.hinkle gmail.com> writes:
 I use windbg.exe 5.1, and doing a "locals" window shows them just fine.
 There's no .pdb file.
Funny, like zwang I've never gotten any locals either. I'm also using 5.1 and compiling with -g. I get stack traces and can step through code but that's it.
Try using the windbg.exe that comes on the Digital Mars CD.
done. anything for a debugger :-) plus I'm sure the other stuff on there will be useful, too...
Apr 29 2005
prev sibling parent Sean Kelly <sean f4.ca> writes:
In article <d4spqt$28e$1 digitaldaemon.com>, Walter says...
"zwang" <nehzgnaw gmail.com> wrote in message
news:d4rvhm$24gn$1 digitaldaemon.com...
 I can step through the code using windbg without a problem. The problem is
that
 no local variables are resolved without a .pdb file, and I can't inspect
any
 value in the "Watch" window.
I use windbg.exe 5.1, and doing a "locals" window shows them just fine. There's no .pdb file.
Maybe that's something more recent versions want? I haven't used WinDbg in a while, but I don't remember being able to view variables by name. I'll have to grab 5.1 and try it out. Sean
Apr 30 2005
prev sibling next sibling parent V <v pathlink.com> writes:
I use MS Visual Studio.NET 2003 for all my projects and I have now begun 
to use it with my first D program ported from C.  It took a bit of trial 
and error plus a couple links that helped out were:

http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironments

http://www.highprogrammer.com/alan/windev/visualstudio.html

http://dlanguage.netunify.com/38

Another thing I used was VSTweak1-1-beta2 to add the extension .d and 
treat it like a C\C++ file for pretty decent syntax highlighting, though 
haven't gotten Intellisense to work on .d files just yet, still workin 
on that. You can find that here:

http://www.visualstudiohacks.com/vstweak


VS.NET's debugger is nice, it shows assembly and code as you step through.

V



Andreas Schmid wrote:
 I'm in desperate need of a debugger for Windows that displays the original 
 source code and lets me step through it. Is there anything like that?
 
 -Andreas 
 
 
Apr 27 2005
prev sibling parent "Walter" <newshound digitalmars.com> writes:
"Andreas Schmid" <monkey gmx.info> wrote in message
news:d4o8jg$191t$1 digitaldaemon.com...
 I'm in desperate need of a debugger for Windows that displays the original
 source code and lets me step through it. Is there anything like that?
You can use windbg.exe which comes on the Digital Mars CD.
Apr 28 2005