Hardcoded "Require 'Debug'" Can't Find the Sourcefile

Hardcoded require 'debug' can't find the sourcefile

After looking into the debug source code, I found a workaround and a fix:

the workaround can be:

trace on
next
trace off
list

this will let you get the listing without restarting the interpreter with -rdebug, with the disadvantage that you'll get some otherwise unwanted output from the tracing, and you'll be able to see it only after moving by one statement

for the fix: the problem is that the SCRIPT_LINES__ Hash lacks a value for the current file... apparently it's only set inside tracer.rb

I've changed line 161, and changed the Hash with a subclass that tracks where []= has been called from, and I wasn't able to dig up the actual code that does the work when stepping into a function that comes from a different file

Also: I haven't found a single person yet who actively uses this module (I asked both on #ruby, #jruby and #pry on freenode), and together with the fact that it uses a function that is now obsolete it leads me to be a bit pessimistic about the maintenance state of this module

nonetheless, I submitted a pull request for the fix (it's actually quite dumb and simple, but to do otherwise I'd need a deeper understanding of this module, and possibly to refactor some parts of it... but if this module isn't actively maintaned, I'm not sure that's a good thing to put effort on)

Visual studio 2010 cannot find executable (after upgrade from 2008)

[SOLVED]

VS 2010 apparently handles the project configurations differently than VS 2008. Having the output path hardcoded in the 2008 configurations caused confusions for 2010. I have replaced the hardcoded paths with VS defaults (using variables instead) and the problem was solved

Visual Studio Code Breakpoint warning: The source code is different from the original version

This happened to me when I upgraded my project from .NET Core 2.0 to 2.1. The problem was that I forgot to edit launch.json to change the binary path from netcoreapp2.0 to netcoreapp2.1 so VS Code was looking for binaries in the wrong place. Editing the path fixed the problem.

EDIT: I suggest VS Code team to adopt a variable-based approach to fix this issue completely, like having something like $TargetRuntime in the path instead of something hardcoded like netcoreapp2.1 etc.

Debugging C++ library with Android Studio

The debug info records the location of the source files when they were built.

(lldb) image lookup -vrn Clory::Engine::instance

The CompileUnit line shows the source file. Suppose it says:

"/BuildDirectory/Sources/Clory/CloryEngine.cpp"

Let's assume you have the source on your machine here:

"Users/me/Sources/Clory"

So you can tell lldb: find the source file rooted at /BuildDirectory/Sources/Clory in Users/me/Sources/Clory instead.

(lldb) settings set target.source-map /BuildDirectory/Sources/Clory Users/me/Sources/Clory

You can use these commands in the lldb console of Android Studio or put into a .lldbinit file for general use.

Why is the project unable to find a file that is right beneath its nose?

Look at the 'References' in the projects in the Solution Explorer, these have a 'Full Path' if that's wrong drop the reference and readd it.



Related Topics



Leave a reply



Submit