Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Unable to invoke VIsual Studio debugger in Child process VS2012 pro

Unable to invoke VIsual Studio debugger in Child process VS2012 pro

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingcsharpvisual-studio
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi, I am creating a child process from a console project way back when I think VS2008 I used to code a _asm { int 3 } to debug the child process the assembler interface is no longer supported under VS2012 so I have tried DebugBreak(); __debugbreak In the constructer of the CwinApp or in the InitInstance but nothing happens When I right click on it to run nothing happens The CreateProcess in the console process gets a 1 so that works The only way I can get into the code is if I bring up another instance of VS2012 as this app is another project in the solution and debug from there any ideas as to why the debugger isn't being invoked would be helpful thanks

    F L 3 Replies Last reply
    0
    • F ForNow

      Hi, I am creating a child process from a console project way back when I think VS2008 I used to code a _asm { int 3 } to debug the child process the assembler interface is no longer supported under VS2012 so I have tried DebugBreak(); __debugbreak In the constructer of the CwinApp or in the InitInstance but nothing happens When I right click on it to run nothing happens The CreateProcess in the console process gets a 1 so that works The only way I can get into the code is if I bring up another instance of VS2012 as this app is another project in the solution and debug from there any ideas as to why the debugger isn't being invoked would be helpful thanks

      F Offline
      F Offline
      ForNow
      wrote on last edited by
      #2

      Hi This is a follow up to previous message I went back to the parent process and used the following two flags in the CreateProcess DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS Well back when I was using VS2008 I would get a dialog box informing the VSDebugger was debugging the process Now nothing maybe the app crashed before it hit CWinApp constructer where I had the DebugBreak(); when I went to the "DEBUG" menu item -> Attach to Process I noticed my app on the selection list When I tried to attach it I got a message Already attached to Debugger I have no idea what debugger as I only had the original instance to VS2012 running (at least that I could see) Any help would be appreciated

      F 1 Reply Last reply
      0
      • F ForNow

        Hi, I am creating a child process from a console project way back when I think VS2008 I used to code a _asm { int 3 } to debug the child process the assembler interface is no longer supported under VS2012 so I have tried DebugBreak(); __debugbreak In the constructer of the CwinApp or in the InitInstance but nothing happens When I right click on it to run nothing happens The CreateProcess in the console process gets a 1 so that works The only way I can get into the code is if I bring up another instance of VS2012 as this app is another project in the solution and debug from there any ideas as to why the debugger isn't being invoked would be helpful thanks

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Can you not run the process directly in VS and debug it in the normal way?

        F 1 Reply Last reply
        0
        • L Lost User

          Can you not run the process directly in VS and debug it in the normal way?

          F Offline
          F Offline
          ForNow
          wrote on last edited by
          #4

          Hi it just dies somewhere my feeling is there is something amiss in the startup code as I put DebugBreak(); In The CWinapp constructer The only way I can debug it if I right click on it VS it gives the option to debug I know the startup code for a MFC app is somewhere in VS->VC->ATLMFC folder just trying to figure which one and put a Debugbreak() there thanks

          1 Reply Last reply
          0
          • F ForNow

            Hi, I am creating a child process from a console project way back when I think VS2008 I used to code a _asm { int 3 } to debug the child process the assembler interface is no longer supported under VS2012 so I have tried DebugBreak(); __debugbreak In the constructer of the CwinApp or in the InitInstance but nothing happens When I right click on it to run nothing happens The CreateProcess in the console process gets a 1 so that works The only way I can get into the code is if I bring up another instance of VS2012 as this app is another project in the solution and debug from there any ideas as to why the debugger isn't being invoked would be helpful thanks

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            hi, still looking at my problem with debugbreak for some reason vsjitdebugger which would normally being up a dialog box to chose a debugger doesn't do that on windows 8.1 vs 2012 pro laptop I think that's part of the problem Thanks

            1 Reply Last reply
            0
            • F ForNow

              Hi This is a follow up to previous message I went back to the parent process and used the following two flags in the CreateProcess DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS Well back when I was using VS2008 I would get a dialog box informing the VSDebugger was debugging the process Now nothing maybe the app crashed before it hit CWinApp constructer where I had the DebugBreak(); when I went to the "DEBUG" menu item -> Attach to Process I noticed my app on the selection list When I tried to attach it I got a message Already attached to Debugger I have no idea what debugger as I only had the original instance to VS2012 running (at least that I could see) Any help would be appreciated

              F Offline
              F Offline
              ForNow
              wrote on last edited by
              #6

              Hi It is apparent there is a issue with debugbreak() Whether it's windows 8.1 or VS 2012 I don't know I know I did _asm { int 3 } On my window 7 vs 2010 and it worked So I am thinking how about this CreateProces(NULL, #if DEBUG "C:\\windows\\system32\\vsjitdebugger.exe myprog.exe", #end #else "myprog.exe", #end Rest of paramters

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups