Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Symbol and source server with native nuget package



  • Hello.

    I use nuget only with native (c++ and coApp) applications.
    Upgrading to the latest version we can use our symbols.nupkg in Visual Studio 2012.
    I also activated the source server in Visula Studio as explained on your KB.
    In my nuget symbols.nupkg I see that my source are present in a src folder but Visual Studio cannot find them (I see under the cache folder for symbols on the Visual Studio machine that only the pdb is present).
    Is there a way to check what happens? Does any edition of proGet support sources?

    Thanks in advance for the info.

    Regards

    Product: ProGet
    Version: 3.7.6



  • Yes, symbol serving works fine. However, it's complicated behind the scenes, and is not trivial to debug.

    On ProGet, the package should say "Symbols and source files are available". If not, then you did not create the package properly. If so, you can see the symbols indexed by clicking the "view" button.

    From there, you will need to attach Fiddler, and find the source request urls being made by Visual Studio. This will give an idea as to where the problem is. It could be the wrong URL you entered, improperly built package, bug in VS2012, etc.



  • Hello.

    Thank you for your answer.

    I actually see the "Symbols and source files are available" but when I press view only the pdb files are shown.
    If I download the package though I see the source code inside it.

    From fiddler I only see the interaction with the symbol server when the module is loaded and the pdb requested, but I do not see any interaction when I try to step into.

    This is a native nuget package (read coApp) and I do not know if that makes a difference nut just to clarify.

    Regards



  • Got it; so, VS is querying ProGet as a Symbol Server, but it's not querying ProGet as a source server. Of course, these are two separate things/processes.

    If Symbol works, but Source doesn't, this means that (1) VS is not configured to use remote source servers, and/or (2) VS can't determine where to source server is based on info in the .pdb symbol file retrieved from ProGet.

    Once you've confirmed #1 (make sure to follow the tutorial very carefully), then you'll need to use PDBStr.exe to inspect the pdb files that visual studio received (not the pdb files stored on ProGet).

    PDBStr will tell you what source streams go to what location; instead of a disk path (like f:\bld\src\b\s\d\myfile.cpp), you should see a url ProGet.



  • Hello Alana

    Thank you for your reply.
    I actually followed the tutorial (skipping only the parts that are related to .net framework and do not apply to native nuget packages using coApp).
    When I use the PDBStr.exe I get this output:

    F:\Symbols\ssFoundationClasses-x86-v110_xp-MTDLL-D.pdb\AB5BFF4CE37748E9A0CA714E671406701>"C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64\srcsrv\pdbstr.exe" -r -s:srcsrv -p:ssFoundationClasses-x86-v110_xp-MTDLL-D.pdb
    SRCSRV: ini ------------------------------------------------
    VERSION=2
    INDEXVERSION=2
    VERCTRL=http
    SRCSRV: variables ------------------------------------------
    SRCSRVVERCTRL=http
    PGSERVER=http://localhost:8082/source-files
    PGFEED=Default
    PGPKGID=SSFoundationClasses.symbols
    PGPKGVER=3.0.1
    HTTP_EXTRACT_TARGET=%pgserver%/%pgfeed%/%pgpkgid%/%pgpkgver%/%var2%
    SRCSRVTRG=%http_extract_target%
    SRCSRVCMD=
    SRCSRV: source files ---------------------------------------
    SRCSRV: end ------------------------------------------------
    

    Is proGet inserting ionfo in the pdb when it is downloaded? In this case where could I see on proGet if the info where actually installed or something went wrong?



  • Hello.

    Another info that could be useful. I am using now a package from nuget.org to check the way I create packages with symbols and source.

    The package is: https://www.nuget.org/packages/pcre.symbols/

    I get the same problem with proGet. If I inspect the pdb (I use pcrecppd.pdb) downloaded through proGet I also find the same empty section:

    SRCSRVCMD= SRCSRV: source files ---------------------------------------
    
    SRCSRV: end ------------------------------------------------


  • Is there anything in ProGet's error log to indicate that there was a problem indexing the pdb files? You can check this by going to the /administration/error-log page and looking for anything logged to the SymbolServer category.



  • Hello Dan.

    I checked in administration and what I see is just "Recent Errors" or "Event log". The "Recent errors" section reports "THere are no errors." twice (one is for indexing errors).
    Is there maybe a file I could check on the server?



  • Note that symbol serving will not work thorough a remote package; you will need to pull the package to ProGet for that to work.

    But, based on the ini header you pasted above, the pdb files appear to be correctly munged by ProGet. However, there are no source files as you've noticed.

    Can you run that same pdbstr command against your original PDB (i.e. the one in the package, not downloaded via that url in ProGet).



  • Hello.

    I did run pdbstr against the pdb as produced by the compilation and I do not get any output. It looks like the srcsrv stream is totally empty.

    Is this useful to shed light on the problem?



  • Ah; well, that would explain it :)

    Your PDB files contain no links to source files, which VS and ProGet are unable o index/locate them. This means you'll need to adjust your complication process to incluse them.

    A quick search surfaced this article, which may be of assistance: Correctly Creating Native C++ Release Build PDBs.

    Please do post an update if you find the issue/setting in your project/build file that prevented this from happening.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation