Re: How to see __argc and __targv command arguments using VS.NET 2005 debugger

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ajay,

I was trying to find out why I wasn't getting the command line parameters
and stepped into the CWinAp::ParseCommandLine(...) which actually fills the
CCommandLineInfo class. It was inside this CWinApp member function that I
wasn't able to use Quickwatch to see what the variable contained. I don't
really want to see the CCommandLineInfo which is the result of the parsing.

I had a similar problem with VS2005 some time ago in trying to look at an
iterator (this->_Mycont). VS2005 had made the _Mycont invisible but one
could see the value by hovering the mouse over it. I was wondering is there
was something similar that one could do to see the insides of the __argc and
__targv variables.

Ed


"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:1160512750.041022.49050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Edward Mitchell wrote:
I have an MFC app (VS.NET 2005) and when I step into the
CWinApp::ParseCommandLine(...) there are externs __argc and __targv
visible.
If I select one and invoke Quickwatch, the message is CX0017: Error:
symbol
"__targv" not found.

How can I look at the command line arguments __argc and __targv using the
debugger?



In MFC, you can use CCommandLineInfo class to access the parameters:

http://msdn2.microsoft.com/en-us/library/zaydx040.aspx

---
Ajay



.