zspitz / PandocFilters

Pandoc filters in .NET
Other
1 stars 1 forks source link

Better debugging experience #4

Open zspitz opened 4 years ago

zspitz commented 4 years ago

To avoid having to type in the command line each time, I've set Properties/launchSettings.json:

{
   "profiles": {
        "_test": {
            "commandName": "Executable",
            "executablePath": "C:\\Program Files\\Pandoc\\pandoc.exe",
            "commandLineArgs": "-s dlr-overview.docx --filter _test.exe -o dlr-overview.md"
        }
    }
}

either by creating this file, or setting it in the Properties pages of the project. When I press F5 or CTRL+F5, Pandoc starts with the appropriate command line arguments, including the built executable.

However, when I try to debug this, I can't get the debugger to attach to the built EXE. The only solution I've found is to call Debugger.Launch() explicitly, and choose the current Visual Studio window from the dialog that pops up.