Can I debug a console app byt attaching a debugger to its process ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Joe Abou Jaoude (anonymous_at_hotmail.com)
Date: 09/23/04


Date: Thu, 23 Sep 2004 04:08:50 -0700


hi,
I compiled a console app to be debuggable and i verified to have the
pdb file along with the .exe file.

in the main function I wrote this line in the begining
Console.ReadLine ()
so that the console application stops and wait for an input, and that
allows me to attache the debugger to the cmd.exe process successfully.

however the aplication isn't stopping at the breakpoints and i m sure
that the app is passing through the code marked by the breakpoints coz
the app is writting the correspondant messages to the console.

Am I missing something here ?

Regards.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Process exits premature
    ... console app. ... In this callback function, the code is like: ... Once B is launched and DebugBreakis reached, VS debugger will come up and you'll be able to step through code, inspect variables, etc. ... If not, you might need to instrument your code: so that it writes strings into your custom logfile to send logging output to debug console, instead of logfile - DebugView.exe can be used to view messages sent to debug console). ...
    (microsoft.public.win32.programmer.kernel)
  • Re: HELP ME-RDI Protocol
    ... > passed back to debugger. ... > create console window" this message is coming during call to ... Since your debugger is a console app, ...
    (comp.arch.embedded)
  • Re: Invalid size specification (e32_vsize == 0) Error - WinCE 6.0
    ... The executable/dll contains a string that is the fully qualified ... The debugger uses that string to find the PDB file on ... VS/PB debugger required them to be in there for me to debug my app! ...
    (microsoft.public.windowsce.app.development)
  • Re: pass commandline parameters
    ... >> I have a app (proj) that is called from the console and it passes ... > Look in the project settings for the debugger section. ...
    (microsoft.public.vc.mfc)
  • Re: Reprise: Pended IOCtrl + LoadLibrary == Deadlock?
    ... the original probelm in the debugger, ... and execute!htrace in both devenv.exe and the target app. ... > If I try to reproduce the error by launching the app from DevStudio, ... >>> ....looking at the docs for STARTUPINFO, ...
    (microsoft.public.development.device.drivers)