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
Getting a Rogue Iteration from My .Each Loop
Ruby: Calculate Time Difference Between 2 Times
Rails 3 - How to Handle Pg Error Incomplete Multibyte Character
Stubbing Controller Actions in Rspec Request Specs
Ruby: Module, Mixins and Blocks Confusing
How to Distribute a Ruby Script via Homebrew
How to Sort So That "Vitamin B12" Is Not in Front of "Vitamin B6"
Restart Rails Server Automatically After Every Change in Controllers
Undefined Method Error When Creating Delayed_Job Workers with Script/Delay_Job
Config Undefined in Environment Specific Configuration Files
How Does This Block Work for Integer Times Method
Import CSV in Batches of Lines in Rails
How to Use String Methods on Utf-8 Characters
Rails Search Query Associated Model
How to Mix Required Argument and Optional Arguments in Ruby
Ruby, Rails Gem Install Error - Error: While Executing Gem ... (Encoding::Undefinedconversionerror)