[ZeroBrane Studio] Re: Remote debugging: IDE project path vs. actual file path

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Thu, 23 Oct 2014 10:21:44 -0700

Hi Jan,

>> So, with this in mind, here is what print(debug.getinfo(1,"S").source) shows:
>> @../../scripts/rogueassembly\init.lua

> Well, what I basically do is manually assembling and executing this line of 
> code FROM WITHIN C++:
> Mods.rogueassembly = require(rogueassembly.init)
> Which only works because ../../scripts/?.lua was added to the package path. I 
> would love to require() using a relative path, but afaik that is not possible.

> Is this possible somehow with a plugin, maybe?

There may be couple of options, but before proposing something, I'd
like to get a bit more information. You reported output from printing
"debug.getinfo(1,"S").source" earlier as being
"@../../scripts/rogueassembly\init.lua". How does it look if you print
it from the file where you have "require('modebug').start()"? What do
you get when you add "print(debug.getinfo(1,"S").source)" right before
starting the debugger?

As one quick thing you may try right now is after you start the
debugger server in the IDE (Project | Start Debugger Server should be
checked), you can run this command in the Local Console:

ide:GetDebugger().options = {basedir =
[[d:\whatever\gamedir\bin\release_win\..\..\scripts]]}

After you execute this command, start the debugging as you normally do
and you should see "Mapped remote request for ..." messages in the
Output window and the breakpoints may work.

Paul.

Other related posts: