digitalmars.D - Where to find a debugger?
- Chris <central_p hotmail.com> Feb 18 2006
- Wang Zhen <nehzgnaw gmail.com> Feb 18 2006
- Chris <central_p hotmail.com> Feb 18 2006
- Hasan Aljudy <hasan.aljudy gmail.com> Feb 18 2006
- Chris <central_p hotmail.com> Feb 18 2006
- "Charles" <noone nowhere.com> Feb 18 2006
- Chris <central_p hotmail.com> Feb 18 2006
- John Stoneham <captnjameskirk moc.oohay> Feb 18 2006
- Chris <central_p hotmail.com> Feb 18 2006
- Chris Sauls <ibisbasenji gmail.com> Feb 18 2006
- Chris <central_p hotmail.com> Feb 18 2006
This question may be asked a thousand times but I'm completely stuck. I've checked all the recommended debuggers but none seems to work on Windows? Where can I find an earlier version of WinDbg? Are there any alternatives to debug D programs? How do you debug? Thank you, Chris
Feb 18 2006
Chris wrote:This question may be asked a thousand times but I'm completely stuck. I've checked all the recommended debuggers but none seems to work on Windows? Where can I find an earlier version of WinDbg? Are there any alternatives to debug D programs? How do you debug? Thank you, Chris
I'd recommend OpenWatcom debugger.
Feb 18 2006
Thank you, but how do I use OpenWatcom debugger with D? I can't make it to work as I expect - set breakpoints in the D source file, etc. It just shows me a disassembly. Wang Zhen wrote:Chris wrote:This question may be asked a thousand times but I'm completely stuck. I've checked all the recommended debuggers but none seems to work on Windows? Where can I find an earlier version of WinDbg? Are there any alternatives to debug D programs? How do you debug? Thank you, Chris
I'd recommend OpenWatcom debugger.
Feb 18 2006
Chris wrote:This question may be asked a thousand times but I'm completely stuck. I've checked all the recommended debuggers but none seems to work on Windows? Where can I find an earlier version of WinDbg? Are there any alternatives to debug D programs? How do you debug? Thank you, Chris
You can google intitle:index.of "windbg.exe" in this thread http://www.digitalmars.com/d/archives/digitalmars/D/30966.html I said: <quote myself> I had success seeing variables using the windbg here: http://www.cs.nmt.edu/~cs221/jbpub/Detmer/Software/ (I downloaded it using the DownThemAll firefox extension!) BUT, it showed the hexadecimal values of the variables! I was able to make it show the decimal values by going options->debugger->Radix and choose the "decimal" radio button. </quote>
Feb 18 2006
Thank you, I've managed to make it work for now. Any other tips than John's tips further down in the thread? Hasan Aljudy wrote:Chris wrote:This question may be asked a thousand times but I'm completely stuck. I've checked all the recommended debuggers but none seems to work on Windows? Where can I find an earlier version of WinDbg? Are there any alternatives to debug D programs? How do you debug? Thank you, Chris
You can google intitle:index.of "windbg.exe" in this thread http://www.digitalmars.com/d/archives/digitalmars/D/30966.html I said: <quote myself> I had success seeing variables using the windbg here: http://www.cs.nmt.edu/~cs221/jbpub/Detmer/Software/ (I downloaded it using the DownThemAll firefox extension!) BUT, it showed the hexadecimal values of the variables! I was able to make it show the decimal values by going options->debugger->Radix and choose the "decimal" radio button. </quote>
Feb 18 2006
There are two debuggers on the DMC CD, one that comes with the IDE ( much better than windbg ) and an old windbg. Charlie "Chris" <central_p hotmail.com> wrote in message news:dt7ad9$28g1$1 digitaldaemon.com...This question may be asked a thousand times but I'm completely stuck. I've checked all the recommended debuggers but none seems to work on Windows? Where can I find an earlier version of WinDbg? Are there any alternatives to debug D programs? How do you debug? Thank you, Chris
Feb 18 2006
I have another question: Can Visual Studio 2005 be used to compile and debug D programs?
Feb 18 2006
Chris wrote:I have another question: Can Visual Studio 2005 be used to compile and debug D programs?
The wiki has a few debuggers mentioned: http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironments As far as I know, the VS2005 debugger can't be used, but I may be wrong.
Feb 18 2006
John Stoneham wrote:Chris wrote:I have another question: Can Visual Studio 2005 be used to compile and debug D programs?
The wiki has a few debuggers mentioned: http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironments As far as I know, the VS2005 debugger can't be used, but I may be wrong.
Thank you for you tips! I finally got WinDbg working. OpenWatcom seems as if it is working too. BTW. How do you watch strings? I have this: debug { char [] h_Name = student.Name; int h_Age = student.Age; } .Name and .Age are properties. For .Age I get a number but I also get a scary number for the string .Name? Can't I view the string value somehow? And also this doesn't work for properties. debug { int *h_ounces = &hamburger.ounces; float *h_cost = &hamburger.cost; } Regards, Chris
Feb 18 2006
Chris wrote:John Stoneham wrote:Chris wrote:I have another question: Can Visual Studio 2005 be used to compile and debug D programs?
The wiki has a few debuggers mentioned: http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironments As far as I know, the VS2005 debugger can't be used, but I may be wrong.
Thank you for you tips! I finally got WinDbg working. OpenWatcom seems as if it is working too. BTW. How do you watch strings? I have this: debug { char [] h_Name = student.Name; int h_Age = student.Age; } ..Name and .Age are properties. For .Age I get a number but I also get a scary number for the string .Name? Can't I view the string value somehow? And also this doesn't work for properties. debug { int *h_ounces = &hamburger.ounces; float *h_cost = &hamburger.cost; } Regards, Chris
Its not real pretty, but this should work if they're just fields: # debug { # int * h_ounces ; # float * h_cost ; # # with (hamburger) { # h_ounces = &ounces ; # h_cost = &cost ; # } # } If, on the other hand, the properties are gettor methods, then I don't think you can 'address' them at all - except maybe with an 'address gettor'. # class Hamburger { # // ... blah # int* ouncesPtr () { return &p_ounces; } # } # // ... blah # with (hamburger) # int * h_ounces = ouncesPtr ; -- Chris Nicholson-Sauls
Feb 18 2006
Thank you, Chris
I cannot say I understand D properties very well. I've just compiled my
"Hi" program to test compiling and debugging:
main.d
import std.stdio;
import student;
void main()
{
int i;
i = 1;
i++;
printf("Hi! The number is: %d",i);
Student student = new Student("John Smith", 30);
writefln("\nFile is: %s", __FILE__);
writefln("Line is: %s", __LINE__);
// Debug variables needed to debug with WinDbg
debug
{
char [] h_Name = student.Name;
int h_Age = student.Age;
}
writefln("\nName is: %s\nAge is: %d", student.Name, student.Age);
printf("\n\nNow press a key to continue!");
getch();
}
student.d
class Student
{
private
{
char [] name;
int age;
}
char [] Name() { return name; }
void Name(char [] value) { name = value; }
int Age() { return age; }
void Age(int value) { age = value; }
Student next;
this(char [] name, int age)
{
this.name = name;
this.age = age;
}
}
Chris Sauls wrote:
Chris wrote:
John Stoneham wrote:
Chris wrote:
I have another question:
Can Visual Studio 2005 be used to compile and debug D programs?
The wiki has a few debuggers mentioned:
http://www.prowiki.org/wiki4d/wiki.cgi?DebugEnvironments
As far as I know, the VS2005 debugger can't be used, but I may be wrong.
Thank you for you tips! I finally got WinDbg working. OpenWatcom seems
as if it is working too.
BTW. How do you watch strings?
I have this:
debug
{
char [] h_Name = student.Name;
int h_Age = student.Age;
}
..Name and .Age are properties. For .Age I get a number but I also get
a scary number for the string .Name? Can't I view the string value
somehow?
And also this doesn't work for properties.
debug
{
int *h_ounces = &hamburger.ounces;
float *h_cost = &hamburger.cost;
}
Regards,
Chris
Its not real pretty, but this should work if they're just fields:
# debug {
# int * h_ounces ;
# float * h_cost ;
#
# with (hamburger) {
# h_ounces = &ounces ;
# h_cost = &cost ;
# }
# }
If, on the other hand, the properties are gettor methods, then I don't
think you can 'address' them at all - except maybe with an 'address
gettor'.
# class Hamburger {
# // ... blah
# int* ouncesPtr () { return &p_ounces; }
# }
# // ... blah
# with (hamburger)
# int * h_ounces = ouncesPtr ;
-- Chris Nicholson-Sauls
Feb 18 2006









Chris <central_p hotmail.com> 