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
Produce debug information in .NET Core fsi #5457
Comments
Does it? I can't even think of a valid reason to produce any kind of debugging symbols (when interpreting) If you are trying to debug a |
@nosami Yes, it was in the context of debugging scripts. Thank you for the link. Hm. It could be a situation where we detected the PDB type wrongly, I'll double check it with the debugger guys. |
@auduchinok Well, that's what I do anyway :) I compile the |
Ah, I see. Haven't looked into the code closely yet. :) |
Maybe it is, no idea. I always thought that interpretation and compilation used completely different code paths though, i.e. interpretation uses System.Reflection.Emit vs IL and PDB generation for compilation. If it is possible, please let me know :) |
On Mono, the debugger first checks for the existence of a |
@auduchinok There is no debug information at all currently being emitted in .NET Code FSI For .NET Framework we won't at this stage change what we do |
(Note I've recycled an old issue to cover the need for debug information in .NET Core) This is related to this issue: dotnet/runtime#28206 (comment) |
This is not going to change. The coreclr does not produce debugging information when building and executing scripts. The feature relied on Reflection Emit APIs that do not exist on the coreclr, and on which there is no intention of adding them back into the coreclr. We may allow script debugging in the future, but it will almost certainly not be dependent upon ref-emit generated assemblies and sequence points. |
We should keep this open as this tracks the missing feature VS support for F# Interactive From offline conversations with @jkotas it was a question of priority and technicality more than anything else |
I guess, but we should at least tag it appropriately |
See user comment here about how script debugging is killer feature. Was looking for the right issue to link to https://mobile.twitter.com/snuupo/status/1345053884557963265 |
Thank you @dsyme Besides the nice features of F#, having a compiled and scriptable language in the CLR universe was very cool. Then appeared F# script debugging and it is like heaven. Developing difficult algorithms can now be developed incrementally interactively: starting with data analysis in scripting land, an algorithm evolves. I can print intermediate values, graph them and explore the data and the algorithm draft. Being able to debug this algorithm draft inside the script is incredibly helpful, since I do not need to transfer it to the final assembly where it lands after begin completed every time I want to debug. Such transfer is not a simple copy paste, but requires some effort, because the code is in draft stage and might include some development utilities from the script environment that are not available in the final assembly where the algo code lands as it is completed. So using the REPL as a lab for difficult algorithms and being able to debug draft code right inside it is incredible helpful. I will dual target my code so I can debug scripts but would be certainly very happy if I would need only Net5 and could do this on all platforms. |
We should solve this by moving to a model where each interaction in FSI emits a different assembly, and we emit each using our standard IL writer with in-memory portable debug symbols. |
as of today it is not possible to debug F# script code Is the priority of this issue set such that we get debugging for dotnet core this year? Would love to switch from dotnet48 to 6 |
Implemented in #12722 |
Closing the issue |
Great to see debugging on dotnet core FSI coming along. When I tested on 17.1.6 today, I still cannot get the debug working. Is it already in the released version or shall I wait for 17.2? |
It's not in 17.1. It should be in 17.2 though. |
Currently fsi produces full PDBs and it seems it cannot be overriden by console arguments. We'd like it to produce portable PDBs (at least on Mono).
Are there any caveats regarding the generation or reasons to generate full ones?
The text was updated successfully, but these errors were encountered: