digitalmars.D - do D has an debugger now?
- zergbird msn.com (4/4) Jan 08 2005 I 'm a beginner of D and like it very much. But I cannot find debugger
- Walter (4/7) Jan 09 2005 On linux, you can use gdb. On Windows, it will work with any codeview
- Charles (13/20) Jan 09 2005 I cannot get MSVC6 to work correctly , i compile with -debug and -g , op...
- Walter (7/31) Jan 10 2005 I have no idea why VC6's debugger fails. If the same executable is worki...
- Charles (22/61) Jan 11 2005 Yea its correct and I've gotten it to work now thanks ( thanks also to A...
- Lionello Lunesu (40/40) Jan 11 2005 It works for me.
- J C Calvarese (5/45) Jan 11 2005 It looks very useful to me. Good job!
- Lionello Lunesu (3/6) Jan 12 2005 Thanks for the hint. I've added it.
- Charles (7/47) Jan 11 2005 Great stuff!
- Huang Yicheng (3/44) Jan 17 2005 This is very useful. Thanks a lot.
I 'm a beginner of D and like it very much. But I cannot find debugger in the package. Isn't it convenient? If there is no debugger, how can I debug the code? zergbird
Jan 08 2005
<zergbird msn.com> wrote in message news:crpag5$2dvk$1 digitaldaemon.com...I 'm a beginner of D and like it very much. But I cannot find debugger in the package. Isn't it convenient? If there is no debugger, how can I debug the code?On linux, you can use gdb. On Windows, it will work with any codeview compatible debugger. This includes windbg, vc's debugger, and the debuggers that come with the Digital Mars C++ CD. -Walter
Jan 09 2005
I cannot get MSVC6 to work correctly , i compile with -debug and -g , open foo.exe in MSVC 6, Build->Start Debug-> Go , just executes the program, not halting at the exception just running it out. If i use Step Into() , it works ok , but I get no function names or values, only mainCRTStartup + Offest in bytes. Am i mis-using it ? Has anyone gotten this to work with DMD .110 ? CodeView version 2 right ? The DM debugger works great. Charlie "Walter" <newshound digitalmars.com> wrote in message news:crs9a3$2b1u$1 digitaldaemon.com...<zergbird msn.com> wrote in messagenews:crpag5$2dvk$1 digitaldaemon.com...debuggersI 'm a beginner of D and like it very much. But I cannot find debugger in the package. Isn't it convenient? If there is no debugger, how can I debug the code?On linux, you can use gdb. On Windows, it will work with any codeview compatible debugger. This includes windbg, vc's debugger, and thethat come with the Digital Mars C++ CD. -Walter
Jan 09 2005
I have no idea why VC6's debugger fails. If the same executable is working with windbg.exe (on the DM C++ CD), then the debug info embedded in the executable is correct. "Charles" <no email.com> wrote in message news:crsebq$2fo1$1 digitaldaemon.com...I cannot get MSVC6 to work correctly , i compile with -debug and -g , open foo.exe in MSVC 6, Build->Start Debug-> Go , just executes the program,nothalting at the exception just running it out. If i use Step Into() , it works ok , but I get no function names orvalues,only mainCRTStartup + Offest in bytes. Am i mis-using it ? Has anyone gotten this to work with DMD .110 ? CodeView version 2 right ? The DM debugger works great. Charlie "Walter" <newshound digitalmars.com> wrote in message news:crs9a3$2b1u$1 digitaldaemon.com...<zergbird msn.com> wrote in messagenews:crpag5$2dvk$1 digitaldaemon.com...debuggersI 'm a beginner of D and like it very much. But I cannot find debugger in the package. Isn't it convenient? If there is no debugger, how can I debug the code?On linux, you can use gdb. On Windows, it will work with any codeview compatible debugger. This includes windbg, vc's debugger, and thethat come with the Digital Mars C++ CD. -Walter
Jan 10 2005
Yea its correct and I've gotten it to work now thanks ( thanks also to AJill : http://www.digitalmars.com/d/archives/digitalmars/D/1608.html ) On a side note, Microsoft(tm) now embeds typeinfo into the codeview information ( tested with MSVC 6 and up ), which allow you to 'inspect' classes and their methods by examing their type ( using DBGHELP's SYMBOL_INFO.TypeInfo structure ). In the article here : http://msdn.microsoft.com/msdnmag/issues/02/03/hood/default.aspx it shows how to do read this information; It also mentions the old way of having CodeView constants for each symbol type, is this the way DM does it ( there is a dump program on that page that shows DM programs [ both dmc and dmd ] dont use type info ) ? If so where can I get a list of these constants ( this is for a debugger ) , or how else can i get the 'type' of local variables so I can display thier values. Thanks! Charlie P.S. The CodeView Typeinfo stuff is expandable , so you can setup your own type for char [] and 'D' aware debuggers could read their values. Getting typeinfo into the CV info would be awesome! "Walter" <newshound digitalmars.com> wrote in message news:crvio3$2u8i$1 digitaldaemon.com...I have no idea why VC6's debugger fails. If the same executable is working with windbg.exe (on the DM C++ CD), then the debug info embedded in the executable is correct. "Charles" <no email.com> wrote in message news:crsebq$2fo1$1 digitaldaemon.com...openI cannot get MSVC6 to work correctly , i compile with -debug and -g ,debuggerfoo.exe in MSVC 6, Build->Start Debug-> Go , just executes the program,nothalting at the exception just running it out. If i use Step Into() , it works ok , but I get no function names orvalues,only mainCRTStartup + Offest in bytes. Am i mis-using it ? Has anyone gotten this to work with DMD .110 ? CodeView version 2 right ? The DM debugger works great. Charlie "Walter" <newshound digitalmars.com> wrote in message news:crs9a3$2b1u$1 digitaldaemon.com...<zergbird msn.com> wrote in messagenews:crpag5$2dvk$1 digitaldaemon.com...I 'm a beginner of D and like it very much. But I cannot finddebuggersin the package. Isn't it convenient? If there is no debugger, how can I debug the code?On linux, you can use gdb. On Windows, it will work with any codeview compatible debugger. This includes windbg, vc's debugger, and thethat come with the Digital Mars C++ CD. -Walter
Jan 11 2005
It works for me. One thing to note is that VC's debugger doesn't always break at exceptions. For example, it won't break if there's a exception handler in the application, which in D there always is (the handler that prints the exception on the console). So for VC to break, you'll have to mark the exception as "break always" in the menu (only available while debugging): Debug -> Exceptions... There, enter the exception number (as dumped in VCs output window), enter some human readable name and select as action "Stop always". Then click "Add". Example, void main( char[][] args ) { int *p = null; *p = 0; } Compile it with -g AND -debug. Run it from VC (F5, debug). In the console you'll see: Error: Access Violation Press any key to continue And in the output pane: Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found. First-chance exception in fart.exe: 0xC0000005: Access Violation. The thread 0x120 has exited with code 1 (0x1). The program 'C:\UTIL\d\debug\fart.exe' has exited with code 1 (0x1). But notice that VC did not break! Now press F11(step into) and go to the menu Debug -> Exceptions. The exception 0xC0000005 exists so we don't add it but we select it. You'll see that the (default) action is "stop if not handled". Change this to "Stop always" and click "Change". Now continue running the program, F5. VC will break. I hope this is clear. L. (Would this be useful on the wiki? Where?)
Jan 11 2005
In article <cs017j$e02$1 digitaldaemon.com>, Lionello Lunesu says...It works for me. One thing to note is that VC's debugger doesn't always break at exceptions. For example, it won't break if there's a exception handler in the application, which in D there always is (the handler that prints the exception on the console). So for VC to break, you'll have to mark the exception as "break always" in the menu (only available while debugging): Debug -> Exceptions... There, enter the exception number (as dumped in VCs output window), enter some human readable name and select as action "Stop always". Then click "Add". Example, void main( char[][] args ) { int *p = null; *p = 0; } Compile it with -g AND -debug. Run it from VC (F5, debug). In the console you'll see: Error: Access Violation Press any key to continue And in the output pane: Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found. First-chance exception in fart.exe: 0xC0000005: Access Violation. The thread 0x120 has exited with code 1 (0x1). The program 'C:\UTIL\d\debug\fart.exe' has exited with code 1 (0x1). But notice that VC did not break! Now press F11(step into) and go to the menu Debug -> Exceptions. The exception 0xC0000005 exists so we don't add it but we select it. You'll see that the (default) action is "stop if not handled". Change this to "Stop always" and click "Change". Now continue running the program, F5. VC will break. I hope this is clear. L. (Would this be useful on the wiki? Where?)It looks very useful to me. Good job! Maybe it should go here: http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironments jcc7
Jan 11 2005
It looks very useful to me. Good job!Thanks! Finally, I'm being useful! :-)Maybe it should go here: http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironmentsThanks for the hint. I've added it. L.
Jan 12 2005
Great stuff! Charlie "Lionello Lunesu" <lionello.lunesu crystalinter.remove.com> wrote in message news:cs017j$e02$1 digitaldaemon.com...It works for me. One thing to note is that VC's debugger doesn't always break atexceptions.For example, it won't break if there's a exception handler in the application, which in D there always is (the handler that prints the exception on the console). So for VC to break, you'll have to mark the exception as "break always" in the menu (only available while debugging): Debug -> Exceptions... There, enter the exception number (as dumped in VCs output window), enter some human readable name and select as action "Stop always". Then click "Add". Example, void main( char[][] args ) { int *p = null; *p = 0; } Compile it with -g AND -debug. Run it from VC (F5, debug). In the console you'll see: Error: Access Violation Press any key to continue And in the output pane: Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolicinformationfound. Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found. First-chance exception in fart.exe: 0xC0000005: Access Violation. The thread 0x120 has exited with code 1 (0x1). The program 'C:\UTIL\d\debug\fart.exe' has exited with code 1 (0x1). But notice that VC did not break! Now press F11(step into) and go to the menu Debug -> Exceptions. The exception 0xC0000005 exists so we don't add it but we select it. You'llseethat the (default) action is "stop if not handled". Change this to "Stop always" and click "Change". Now continue running the program, F5. VC will break. I hope this is clear. L. (Would this be useful on the wiki? Where?)
Jan 11 2005
This is very useful. Thanks a lot. "Lionello Lunesu" <lionello.lunesu crystalinter.remove.com> wrote in message news:cs017j$e02$1 digitaldaemon.com...It works for me. One thing to note is that VC's debugger doesn't always break at exceptions. For example, it won't break if there's a exception handler in the application, which in D there always is (the handler that prints the exception on the console). So for VC to break, you'll have to mark the exception as "break always" in the menu (only available while debugging): Debug -> Exceptions... There, enter the exception number (as dumped in VCs output window), enter some human readable name and select as action "Stop always". Then click "Add". Example, void main( char[][] args ) { int *p = null; *p = 0; } Compile it with -g AND -debug. Run it from VC (F5, debug). In the console you'll see: Error: Access Violation Press any key to continue And in the output pane: Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found. First-chance exception in fart.exe: 0xC0000005: Access Violation. The thread 0x120 has exited with code 1 (0x1). The program 'C:\UTIL\d\debug\fart.exe' has exited with code 1 (0x1). But notice that VC did not break! Now press F11(step into) and go to the menu Debug -> Exceptions. The exception 0xC0000005 exists so we don't add it but we select it. You'll see that the (default) action is "stop if not handled". Change this to "Stop always" and click "Change". Now continue running the program, F5. VC will break. I hope this is clear. L. (Would this be useful on the wiki? Where?)
Jan 17 2005