-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging guide #295
Comments
I finally got it to work, though it ate more time than I'm prepared to admit. Steps seem to be:
<PropertyGroup>
<!-- Common debugging support -->
<StartAction>Program</StartAction>
<StartProgram>$(DevEnvDir)\devenv.exe</StartProgram>
<StartArguments>/rootsuffix Exp</StartArguments>
</PropertyGroup> Once that's done (and perhaps this should be done in the repo), each time you want to start debugging:
Hopefully someone can refine this process because it's a bit hit-or-miss for me. |
Unfortunately, our assumption up to now has been that only folks with experience in debugging extensions would be doing this. It sounds as if it's new to you and - again unfortunately - there's a lot of smoke and mirrors involved. The copying of entries from one project to another makes no sense to me. In the past, I had the install project set up to start the experimental instance but somebody changed it to the adapter project. So long as you set the correct project as the startup project, everything works. You can do this in the properties dialog, without editing any csproj files. The steps you are following are very close to how I did it when I first started working on the extension but is a bit too complicated for my taste now. With Terje's help, here's what I now do:
I hope this helps. What are you working on? I'm trying to get the adapter release out, so this may not be the best time to start working in it unless your work is just held over till the next quarter. |
@OsirisTerje Where do you think a documentation page like this belongs? My first reaction is that it belongs in the documentation wiki rather than in a file in the root of the project. IMO such files should just give the barest outline and shouldn't have to teach people how to work on extensions. A docs page could go into more depth and would serve all our extensions. The README in each project could link to the right page. What do you think? |
I have debugged extensions in the past. Debugging test adapters is a bit more specialized than normal extensions, you'll have to admit- for one thing, it's split across processes which sometimes recycle.
This is part of what I was saying- that's not actually the case. You have to build the NUnit3TestAdapterInstall project to register the extension in the experimental instance, and that does not happen if you just go with the NUnit3TestAdapter project. Also, even if you do a one-time build to get that out of the way, it'll bite you again if you switch build configurations and the VSIX path changes.
That's exactly the sort of process that would be good to document. I didn't find that. Also: can I leave my NUnit VS adapter installed and still have it replaced by the debug VSIX in the experimental VS instance? It's nice to read the answer rather than taking 5-10 minutes to test it and hope you aren't making some other mistake which invalidates your findings.
Just debugging enough to diagnose #296 |
@CharliePoole Imho the documentation itself should be in the wiki, but we could add a readme file with links to the appropriate sections in the wiki, to be more helpful. @jnm2 About your questions, I'll try to answer them VSIX running: Uninstall all existing vsix adapters, they are just going to be a nuisance. The way VS searches for the adapters is just weird. Also, make sure you have an easy way to kill the vstest processes. I keep a short cmd on my desktop, with the appropriate taskkill command: |
@jnm2 Which exact version number do you have on your VS 2017 ? (See Help/About) |
@OsirisTerje 15.0.26020.0 |
@jnm2 Looks like Terje has filled in a lot of stuff. Just a few comments...
@OsirisTerje I'll set up a page in the right place to get us started. |
There is now a section in the docs, pointing to this post with complete steps. |
Please provide a single step-by-step guide to hitting your first breakpoint in the VS adapter.
I'm stuck and the root of the repo is the first place I look for such things.
Debugging.md
orGetting Started.md
or something similar?I've tried:
LAUNCHDEBUGGER
vstest.executionengine.x86.exe
, multiplevstest.discoveryengine.x86.exe
, andvstest.console.exe
And I still can't get any NUnit code to be loaded. Breakpoints are disabled and the Modules window has no NUnit assemblies. I can't figure out a way to install the debug VSIX to the experimental instance, but I would expect that to happen automatically when I start debugging? It doesn't show up in Extensions; is it supposed to?
(This is VS2017.)
I can't imagine it's as complex as all this? What am I missing?
The text was updated successfully, but these errors were encountered: