C
C#3mo ago
cow

Possible to F12 into C# source?

VS 2022 latest version. When I F12 onto something like .FirstOrDefault() it just tells me a summary like this: (see screenshot 1) Is it possible to view the acutal source code on F12? I thought if these options were ticked I could view source code, but I guess I misunderstood? (see screenshot 2)
No description
No description
36 Replies
Amelia
Amelia3mo ago
does ctrl + f12 work better for you?
cow
cow3mo ago
no it still gives that same summary/comment
cow
cow3mo ago
i get a page full of stuff like this
No description
cow
cow3mo ago
and when i expand a function, its just a comment:
No description
cow
cow3mo ago
not the actual source code
jcotton42
jcotton423mo ago
that should definitely work for modern versions of .NET, what runtime version are you targeting @cow?
cow
cow3mo ago
.NET 8 latest version 8.0.2 i think
reflectronic
reflectronic3mo ago
yeah it's supposed to work if you're on .NET but sometimes it doesn't like i just tried it, and the first time it brought me to the metadata view, and then i closed that and tried again and it brought me to the source
cow
cow3mo ago
i've closed and opened a few times but no luck ok but good to know i'm not going crazy. I should be able to view source code
reflectronic
reflectronic3mo ago
cow
cow3mo ago
yeah but I'd love to have that info in the IDE just by pressing a button
Henkypenky
Henkypenky3mo ago
it's weird in vs it doesn't work sometimes, in rider it does
cow
cow3mo ago
I've never had it work... i just stumbled on a discussion online and people had screenshots of the source and i was like ?????? you can do that??? but sadly doesnt work for me
Henkypenky
Henkypenky3mo ago
are you loading symbols?
cow
cow3mo ago
how do i check that
Henkypenky
Henkypenky3mo ago
chck options, debugging symbols
cow
cow3mo ago
ok
Henkypenky
Henkypenky3mo ago
and uncheck just my code
cow
cow3mo ago
No description
Henkypenky
Henkypenky3mo ago
toggle it
cow
cow3mo ago
ok... im not
Henkypenky
Henkypenky3mo ago
and disable just my code build once and then try to check the source code
cow
cow3mo ago
do i need to be debugging for it to work?
Henkypenky
Henkypenky3mo ago
yes build in debug
cow
cow3mo ago
i mean, it's built yes, but do i need to launch the debugger
Henkypenky
Henkypenky3mo ago
just run it in debug like you always do with the debugger attached it should load all the symbols
cow
cow3mo ago
ok yeah its spending a long time loading symbols now hopefully it will work once it's done 👍
Henkypenky
Henkypenky3mo ago
first time it takes longer then it's faster
cow
cow3mo ago
ok so I set a breakpoint at a TryParse, and I can step inside and see TryParse source and step through it which is cool and good progress
Henkypenky
Henkypenky3mo ago
good to hear
cow
cow3mo ago
but if i just hit f12 on TryParse it still just shows the comments, not the source so i have to actively debug and step into it
Henkypenky
Henkypenky3mo ago
yeah it's weird, i don't VS anymore to help cause i switched to rider sorry bus as reflectonic said just use source.dot.net
cow
cow3mo ago
yeah might have to anyway, half way there, thanks very much 🙂
Henkypenky
Henkypenky3mo ago
there is probably another setting i'm missing here https://learn.microsoft.com/en-us/aspnet/core/test/debug-aspnetcore-source?view=aspnetcore-8.0 enable source link support
cow
cow3mo ago
oh yep already ticked for me
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server
More Posts
Thread.sleep in a constructorSince you can't await in a constructor, I'm calling an async method and just sleeping the thread forEbay's new "RESTFUL" api's seem to have done away with seller JSON responsesIt looks like I can't just query my own ebay listings (auctions, buynows). They have some weird scheNpgsql.NpgsqlOperationInProgressException: A Command is Already in Progress in MassTransitHey peeps, I've been struggling with this issue for a few days now, I'm trying to publish outbox mesThe best-practice way to use a plausibility checkSo, I have the following class ```csharp namespace CleanLib.Lego.Parts; public class Color : EntitMaking a field eligible for GCrecently i've been working on a small game engine and i'm trying to call the GC to free my entities Object reference not set to an instance of an objectI'm making a simple UDP packet sender but for some reason I have this error when I attempt to start how to use 'like' in SSRSHI ALL. i have a query where i'm trying to use 'like' with a parameter and it doens't seem to be wor✅ Which is the more correct way of class instantiation?```cs // app.axaml.cs public override void OnFrameworkInitializationCompleted() { if (Applicatio✅ project can't find file that is in bin folder avaloniaHelpers.cs: https://pastebin.com/WSCLp8he TermsOfServiceView.axaml: https://pastebin.com/xEgKRneg Te✅ How should I name my ef core migrations?I'm wondering if there is a good way to name your migrations. I have noticed that, you quickly end-u