Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Stupid VS.net: function debugging or is it me ?

 

Hi,

I'm using VS.net on Windows 2000 to write and debug c++ programs.My problem is when it comes to debugging.I want to step through the application and watch the contents of the variables.This works fine until I start get to a function call.This hightlights the current line of code but then leaves my code and jumps into the libraries that I use.

 

I then have to step through each line of ostream and the dissasssembly.I can't figure out how to stop this.All I want to do is debug MY code not and not have to go through the libraries code.Anyone offer any suggestions ? Thanks in advance.

Edited by DevNine
Posted

Just noticed that VS.net ONLY jumps to disassembly debugging when I call a function.Below is my code.Is there a problem with my prototypes or the way I call my functions ? The code compiles fine :(

 

#include <iostream>

using namespace std;

void CharToBin (char); // function converts the ascii value of char to binary

void DecToHex (char); // function converts the ascii value of char to hexadecimal

 

int main ()

{

char c;

character:" ;

cin >> c ;

cout << "sasdasd";

CharToBin ©;

}

 

//*****CharToBin : Convert decimal to binary ***********

void CharToBin (char c)...........

{

  • *Experts*
Posted

I tried both a Win32 Console project (unmanaged) and a .NET Console project (managed). It worked find for me. I put a breakpoint on the call to CharToBin (mine just casts c to an int) and pressed F11 and it stepped right into CharToBin.

 

I'm not sure what the following line does. I removed it from my test:

character:" ;

It won't compile with it in.

 

Maybe there's a project property that you've changed (I have no idea). I have a default setup of C++ .NET with only a few extra Library directories (Tools->Options->Projects->C++ Directories).

 

Can you post your test app?

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...