question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question about URL format in embedded JSON

See original GitHub issue

Does the URL have to be http:///https://, or can it be file://, ftp://, etc.?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
chuckriescommented, May 23, 2018

@yaakov-h There are several ways the debugger will try to find local sources before it will use source link, such that embedding a file:// URI in Source Link would not be necessary. Here are some of the heuristics the debugger will use to find source files locally on disk:

  • Locally built binaries: If you build binaries from local source and debug them on the same machine, the debugger will simply find the source at it’s absolute path on disk with no configuration required.
  • Binaries built on another machine: If the source file cannot be found at its original absolute path, the debugger will search all the projects (for a solution) or the opened folder (for File -> Open Folder scenarios) for matching source files. For solutions, the debugger will also search Debug Source Files folders, which can be configured through the Solution level properties
  • The Open File Dialog and No Source Found page: If the debugger cannot find source anywhere (including not finding it through Source Link), it will prompt the user with a File Open dialog so that you can manually point to the source file on disk. You can optionally choose to add the location of the found source file to the list of directories the debugger will search. If you choose to cancel the File Open dialog, you will be shown the No Source Page which contains diagnostic messages about where the debugger searched for source. You can always click the browse hyperlink to search for source again. No Source Page
  • Checksum Matching: The debugger always performs a checksum match between the original file (whose checksum is stored in the debug symbol file) and the file we have found on disk by any method above. If the checksum doesn’t match, the debugger will not treat the file as the correct source file. If you want to disable this checksum matching behavior and force the debugger to open a file with a matching file name, you can turn it off in Tools -> Options -> Debugging -> Require Source File to Exactly Match the Original Version.

One benefit of Source Link is not requiring your local source code to be checked out at the exact same version/commit to match the source you are debugging. The debugger does not have any way to find source locally on disk that is stored in a version control system at a different commit than what is checked out.

0reactions
jnm2commented, May 22, 2018

@yaakov-h The local sources are at the exact same path on every developer’s machine?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add a URL String in a JSON object
I need to add a URL typically in the format http:\somewebsite.com\somepage.asp. When I create a string with the above URL and add it...
Read more >
An Introduction to JSON
JSON, short for JavaScript Object Notation, is a format for sharing data. As its name suggests, JSON is derived from the JavaScript programming ......
Read more >
jq - How to convert embedded (quoted) json string to json
With jq 's fromjson function: Sample stuff.json contents: { "stuff": "{\"date\":\"2018-01-08\"}" }. jq -c '.stuff | fromjson' stuff.json.
Read more >
Worked example needed of displaying JSON data from...
Hello, I am using confluence server, and I need to display JSON data from a url (an API) in a table on a...
Read more >
Case Study: How To Parse Nested JSON
First, I want to understand what I am dealing with and because the display of the JSON response is not so nice for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found