-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Best way to debug OC packages #1521
Comments
@sebastienros Any thoughts on this? This could really boost the developer experience and could help identify bugs more quickly. |
I'm also very interested in this. Currently I have to basically copy my custom modules to the OrchardCore full-source solution and troubleshoot from there. It works, but increasingly inefficient as our application's complexity increases. |
I think we just need to include
So maybe we just need to set this property (with a very long name) to true. See here where @jnm2 suggests a shorter property name I will look into this tomorrow. |
Beyond including the pdbs in the nupkg, you probably also want to GitLink (or SourceLink or embed) your source files if you aren't already. That makes it so much easier for people to step into source- they don't need to have the source on their hard disk and browse to each file. You might be interested in this comparison of the available options, especially the final nupkg size comparison lower down. |
That would be a dream come true. |
I have a solution that works, at least on my machine, i will commit it soon so that you can try it. |
MVC uses SourceLink |
@jtkech you are awesome. One more thing I think it would be useful to mention it in the docs so people would be aware of this thing. And it's basic but it could be helpful if we mention how to enable it (uncheck "Enable Just My Code" in the debugging options). |
@alberthajdu Library consumers using the new csproj format will also have to make sure the PDBs are copied to the build output directory for the time being, in addition to unchecking Enable Just My Code. (I highly recommend Just My Code Toggle by Sam Harwell if you switch back and forth a lot.) Basically, everything in https://github.com/nunit/docs/wiki/Debugger-Source-Stepping except step 2 which is specific to GitLink. |
@alberthajdu thanks for the feedback and happy to know it works for you. @jnm2 about copying pdb files, as i remember i didn't have any issue with this.
Moreover now, for a given library, we also embed the pdb file itself in the assembly.
@alberthajdu i didn't need to uncheck
You're right about the doc but could you re-try with these options? |
Ah, so |
Good point thanks. I naively thought it could not be an issue. Are you talking about dll sizes and / or performance? I didn't see any too big increase of sizes and no impact on performance. |
@jtkech the mentioned options are checked for me. I think they are checked by default. |
@jtkech It will only affect DLL size. (IP rights aren't an issue since this is open source. 😊) What was the final size? For NUnit, it would have been 3.8 times the original size and we weren't impressed with that. |
@alberthajdu okay thanks, so the only difference is that i didn't need to uncheck @jnm2 okay cool. For most of the libraries it was less than twice, sometimes a little more. After analyzing the sizes of dll, pdb, and nupkg, it seems that a pdb is already compressed when it is embedded in a dll. |
There is a non-best but effecient way #10603 |
What's the best way to debug OC packages when used from the MyGet source (https://www.myget.org/gallery/orchardcore-preview)?
I've found this symbol server doc http://docs.myget.org/docs/reference/symbols but it seems like the orchardcore-preview feed doesn't have a symbol source.
A documentation regarding this topic would be useful too.
The text was updated successfully, but these errors were encountered: