Author Topic: How to change the executable path for WinDbg  (Read 4959 times)

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
How to change the executable path for WinDbg
« on: February 17, 2013, 11:27:01 PM »
I have opened a VS2010 workspace with SlickEdit and I am able to edit and build the project successfully.  The output file (.exe) is not in the standard location and to execute it with ctrl-f5 I was able to change to path to the executable in the project properties for the execute tool.  However, I cannot debug the .exe with WinDbg as I can find no way to change the path to the executable.  The debug tool configuration for WinDbg specifies a SlickC macro 'vcproj_windbg_debug' which, when edited, is an empty function.

How can I change the path of the executable so that I am able to debug it in SlickEdit using the F5 key please?

I'm using SlickEdit v17.0.3.0 under Windows 7 64 bit.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: How to change the executable path for WinDbg
« Reply #1 on: February 18, 2013, 06:01:59 AM »
Doing some more digging on this, I found the vcproj-debug-options command which appears to allow changing of the path to the executable and the symbols.  Selecting the project and running this command shows a dialog where these can be entered.  However, entering the values makes no difference to debugging with WinDbg which stills says that it is unable to create the process.  Also, entering the command again for the same project shows empty text fields which makes me think that it doesn't save the entered values.

Any ideas please?

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: How to change the executable path for WinDbg
« Reply #2 on: February 18, 2013, 02:25:13 PM »
vcproj-debug-options is what you need to set the executable path in cases where it cannot be resolved automatically.  However, I am getting a Slick-C stack when I invoke command, which may be why it isn't saving the values correctly.  I am working on a hotfix to address the Slick-C stack.

As a temporary workaround, and you are comfortable manually editing XML you could manually add the configuration directly to the SlickEdit project file (.vpj).

For each project configuration there is a <Config> node:
Code: [Select]
<Config
        Name="Debug|Win32"
        Type="vcproj"
        DebugCallbackName="windbg"
        OutputFile=""
        CompilerConfigName="Visual Studio 2010">
...
</Config>
<Config
        Name="Release|Win32"
        Type="vcproj"
        DebugCallbackName="windbg"
        OutputFile=""
        CompilerConfigName="Visual Studio 2010">
...

Before the end of each Config node, you can add these properties specifically for WinDbg:
Code: [Select]
<List Name="WinDbg Options">
            <Item
                Name="OutputFile"
                Value="C:\work\project\Debug32\executable.exe">
            </Item>
            <Item
                Name="SymbolPaths"
                Value="">
            </Item>
        </List>
    </Config>
Where OutputFile is location of the executable and SymbolPaths are locations of PDB files.

If you are still unable to create process after setting output file, it could be a problem finding the Debugging Tools for Windows paths or the correct dbgeng.dlls.

rjpontefract

  • Senior Community Member
  • Posts: 250
  • Hero Points: 10
Re: How to change the executable path for WinDbg
« Reply #3 on: February 19, 2013, 09:12:31 PM »
Thanks for your reply. 

I have edited the .vpj file and debugging with WinDbg now works perfectly.