[ZeroBrane Studio] Re: Can't step into functions in different files

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Thu, 10 Jan 2013 09:13:47 -0800

Hi Tim,

> I still can't get "editor.autoactivate = true" to work in my CFG file,
> but provided the files are already open in the IDE then I can step in.

Do you see "Couldn't activate file '...' for debugging; continuing
without it." message? If not, you have probably not specified
"editor.autoactivate = true" in the right place. It needs to be in
cfg/user.lua.

You can always see if the setting is active if you type
"ide.config.editor.autoactivate" in the local console window. It
should return "true". You can change it using the console too. Set it
to true by running "ide.config.editor.autoactivate=true" there and see
if it helps.

Paul.

On Thu, Jan 10, 2013 at 1:47 AM, Tim Closs <tim.closs@xxxxxxxxxxxxxxxxx> wrote:
> Hi Paul
>
> It's working now - not sure what's changed, the paths were all correct...
> I still can't get "editor.autoactivate = true" to work in my CFG file,
> but provided the files are already open in the IDE then I can step in.
>
> Thanks,
> Tim
>
> On 04/01/2013 17:08, Paul K wrote:
>> Hi Tim,
>>
>> This is most likely caused by a mismatch between the path used in the
>> breakpoint set by the IDE and the path reported by your Lua engine.
>>
>> First, you need to make sure you have the project folder set to the
>> folder where foo.lua is located.
>>
>> If this doesn't resolve the issue, try adding
>> `print(debug.getinfo(1,"S").source)` to your source code and see if
>> the path there combined with what's reported in ZBS in "Debugging
>> session started in '....'" matches the actual file location.
>>
>> For example, if `getinfo` reports `@./mysubfolder/bar.lua` and the
>> debugging session is started in `/foo`, then the file is expected to
>> be in `/foo/mysubfolder/bar.lua` (this should be the same filepath
>> where you set the breakpoint in the IDE).
>>
>> Paul.
>>
>> On Fri, Jan 4, 2013 at 2:30 AM, Tim Closs <tim.closs@xxxxxxxxxxxxxxxxx> 
>> wrote:
>>> Apologies for the newbie question...
>>>
>>> I can't step into functions, or hit breakpoints, on functions within
>>> separate Lua files.
>>>
>>> I have cfg/user.lua set up, with "editor.autoactivate = true"
>>>
>>> If I try to step into the function, it simply steps over the function
>>> (executes it).
>>> Setting a breakpoint at the top of the function itself makes no difference.
>>> Opening the file manually within the editor makes no difference.
>>>
>>> I should note that the file exists within a subfolder of the one being
>>> stepped through.
>>> So conceptually:
>>>
>>> foo.lua -- here's the one I'm stepping through
>>> mysubfolder/bar.lua -- here's the one containing the function I'm trying
>>> to set into
>>>
>>> Any help much appreciated!
>>> Cheers,
>>> Tim
>>>
>>> --
>>> Tim Closs
>>> CTO
>>> tim.closs@xxxxxxxxxxxxxxxxx
>>>
>>> Marmalade
>>> 31 St Petersburgh Place
>>> London W2 4LA
>>> +44 8456 434 969
>>>
>>> madewithmarmalade.com
>>> www.youtube.com/user/madewithmarmaladecom
>>> @marmaladeapps
>>>
>>>
>
> --
> Tim Closs
> CTO
> tim.closs@xxxxxxxxxxxxxxxxx
>
> Marmalade
> 31 St Petersburgh Place
> London W2 4LA
> +44 8456 434 969
>
> madewithmarmalade.com
> www.youtube.com/user/madewithmarmaladecom
> @marmaladeapps
>
>

Other related posts: