I was wondering if anybody has got debugging working from within Visual Studio 2022 with Vegas 21 or 22?
My dll's work perfectly when loaded from within Vegas. So my build environment is all okay. I build against .Net Framework 4.8.
In the debug section of the project I have:
- Start external program:
- C:\Program Files\VEGAS\VEGAS Pro 22.0\vegas220.exe
- Command line arguments:
- -SCRIPT:D:\scripts\VegasPro\Trial06\Trial06\bin\Debug\Trial06.dll
But this results in:
The program '[139920] vegas220.exe' has exited with code 0 (0x0).
(Actually pretty fast, way faster then starting Vegas usually takes.)
I tried numerous things without success:
- Started VS as Administrator
- No command line argument
- Ran SysInternals' process explorer and looked for errors that made any hint to a cause
- Changed external program into a random other executable (that starts fine)
An alternative solution may be to use 'attach to process' when Vegas is already running. But I could not get that to work either. It just does not stop at my break point. I tried putting a messagebox and when the script was at the messagebox, add my breakpoint and click okay in the messagebox. But that did not work either. So any advise on how to do this may also be a great solution as not having to start Vegas each time would be a good time saver and with the "vegas.UnloadScriptDomainOnScriptExit = true;" in the script, it does not have to be closed again before you can rebuild a new version.