-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
How to debug benchmarks that fail with exception on file system access operations #311
Comments
Yep, you are right.
Unfortunately, there is no a nice way to debug a benchmark in the current version of BenchmarkDotNet. For now you could do the following: mark your benchmark class with the @adamsitnik, I think, it would be nice to have an option which will run something like |
@AndreyAkinshin Thank you for your quick response. I will try to debug the benchmark using the generated files as you suggest. Hopefully, it will help me resolve the file system access issue. Update I was able to run my benchmarks under VS by loading the generated project.json (after applying [KeepBenchmarkFiles] as you recommended) -- Feel free to close this issue. ~ Igor |
@AndreyAkinshin @adamsitnik In my But I can't honestly remember if I ever tried actually debugging into the generated code, so that would need testing |
@mattwarren thanks for the info, it would be great to use pdb file for generated project. @adamsitnik, can we do it? |
@AndreyAkinshin @mattwarren I like the idea with .pdb and Debuger.Break, will try it soon. |
Here's the exception I observe when run my benchmark. When run from visual studio, I don't hit breakpoints I set in benchmark methods, I guess this is because the library compiles the original benchmark into some other binary artifacts which in turn get executed later. Obviously, these binaries are not known by Visual Studio, so my breakpoints are not magically mapped to the binaries' locations.
How do I approach debugging? I am not sure whether I misconfigure (underconfigure) my benchmarks or there's some kind of logical bug.
The text was updated successfully, but these errors were encountered: