How to Debug Library Code using Visual Studio [.Net 6 Example]

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024

ความคิดเห็น • 14

  • @lebeluet
    @lebeluet ปีที่แล้ว +1

    Thank you so much for sharing this process, it's exactly what I was looking for. Part time I learn C#, the development process and I develop a small application which contains my own packages. I'm just starting out (2 years part-time) and that's exactly what I was looking for. If I find other videos or blog posts that demonstrate a simpler process, I will not hesitate to share this information with you.👍

  • @groovefunkadelik
    @groovefunkadelik ปีที่แล้ว +6

    What if you do not have the source code but you only have the dll? Which somehow with the help of dotpeek and ILSpy you can view the code.

  • @munisekhar5158
    @munisekhar5158 5 วันที่ผ่านมา

    Life saviour

  • @mackosajt86
    @mackosajt86 ปีที่แล้ว +1

    i am confused. which is the nuget package and whcih one is not? i am assuming that seiglib is the nuget but at the end that is the one you run. i am totally confused.

    • @DataVids
      @DataVids  ปีที่แล้ว +1

      So this video looks at a DataVids package 'seigelsoftwarepackage' source in devops within that 'seigellib'. What might be confusing you is the namespace for that package. At about 2:47 I jump over to the SeigelLib project (the one we are including via Nuget package) from the Datavids project. This is all assuming that the nuget package is one you created and published, not someone elses nuget package in which you don't have the sourcecode for. So really whats happening is you are debugging a class library which is externally included (and assumably that class library was at some point published as a package, but it doesn't have to be to use this technique).

  • @primavera919
    @primavera919 2 ปีที่แล้ว +1

    I didn't get it, what is the second solution? And how you were able to debug another compiled DLL if you don't have the source code

    • @DataVids
      @DataVids  ปีที่แล้ว

      The SeigelLib project is the code that was used to create the nuget package that the other running visual studio (the console app) is consuming. So it allows you to debug the package, but only if you already have the source code. The second solution would be debugging using symbols, I don't think I ever actually showed that. Symbols can be loaded via pdb like this: learn.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2022 I haven't tried this tutorial, but I found it when looking to answer this question and it looks promising: jackspektor.medium.com/not-just-my-code-how-to-debug-third-party-libraries-without-decompiling-them-8e47e706dbe7 But, I prefer the method shown in the video as to using the symbols. As far as debugging code that is not yours or that you don't have (just the dll), I think you would need to deconstruct it first (generate c# from dll) - redgate used to have some tools for that, perhaps they still do - but its not really the topic of the video, please accept my apologies if I mislead you on that. Hope this helps, and have a great day!

  • @medusaskull9625
    @medusaskull9625 ปีที่แล้ว +1

    Is there a better way? What if you want to debug both app in integrated mode. Step from the executable into nuget?

    • @DataVids
      @DataVids  ปีที่แล้ว

      Well this is the way that I have done it, but what I have learned in this field is that there is always multiple solutions to every problem (and in this case possibly better ways than the ones I know!). But if you find out please do share a link to it here for anyone else that comes along. thanks!

  • @ukaase
    @ukaase ปีที่แล้ว +1

    it worked so well damm thankyou so much sir

    • @DataVids
      @DataVids  ปีที่แล้ว

      @Ukase thats awesome! So glad to hear it.

  • @joshibhushan1
    @joshibhushan1 ปีที่แล้ว

    I have created some custome nuget packages for our project but the people who are consuming are using VSCode. So any option by which they can debug those packages in VSCode. The links which you have share in one of the comments shows so far it's not supporting VSTS Mac and VSCode

  • @imtiazmehedi853
    @imtiazmehedi853 5 หลายเดือนก่อน

    Confusing video

  • @Ayoubased
    @Ayoubased 8 หลายเดือนก่อน

    how can I debug vips c++ code using vscode?