Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 396930 - [debugger] Various small fixes & changes
Summary: [debugger] Various small fixes & changes
Status: RESOLVED FIXED
Alias: None
Product: LDT
Classification: Tools
Component: LuaDevelopmentTools (show other bugs)
Version: 0.9   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: 1.0 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 10:12 EST by Christian Morgenstern CLA
Modified: 2013-05-25 11:54 EDT (History)
1 user (show)

See Also:


Attachments
Patch for debugger.lua 0.9 RC2 (2.11 KB, patch)
2012-12-19 10:12 EST, Christian Morgenstern CLA
contact: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Morgenstern CLA 2012-12-19 10:12:13 EST
Created attachment 224919 [details]
Patch for debugger.lua 0.9 RC2

Integrating debugger.lua into the project I'm currently working on required some fixes & changes. I've attached a patch to apply those.

Here is a short description with the line in the original file.
1188 Don't invoke metamethods of debuggee metatables
1648 Local variable fix
1831 Avoid _G metamethods
2505 Allow start without active debugger session
2603 Avoid _G metamethods
2647 Allow (quick) start without active debugger session

The debugged scripting environment is "locked down" thus __index or __newindex on any table triggers an error(). That's why I added the metamethod avoidance.

The change in line 1188 might be a bit controversial though, as this keeps the "length" feature from working correctly if the metatable of a table is a pure proxy table. IMHO a very rare case.

The connect-loop in line 2647 has been removed, which might break some existing use case. However in my case it's preferable to not wait for X seconds on startup. Maybe there is a better way of getting both to work, e.g. a delayed debuggee start?

"Start without active debugger" is already covered in Bug 379965, but not fully, as the change to the Init function isn't mentioned there.
Comment 1 Simon Bernard CLA 2013-02-01 09:21:57 EST
Hi thx for the patch.

Somes remarks, after discution with Julien Desgats (the main debugger developper):

1188: We are dicussing about that.
1648: wi will integrate it.
1831,2603 : we will integrate it.
2505 : we will integrate it.
2647 : we will think about that too.
Comment 2 Simon Bernard CLA 2013-02-27 05:32:49 EST
1648,1831,2603,2505,2647 : integrated in commit ba70f77ce90c5b934b1e24f02a3e589ec63b9ac4  and c9e2fafc4538541ec5c7d3dc5acfe1412e8c725c
Comment 3 Benjamin Cabé CLA 2013-02-27 05:41:26 EST
Comment on attachment 224919 [details]
Patch for debugger.lua 0.9 RC2

flagging iplog+ since latest fixes integrated are inspired by/taken from this patch
Comment 4 Simon Bernard CLA 2013-03-04 04:39:37 EST
I close this bug.
Christian if you think the metamethods problems is important, open another bug to start a discution on it. 
Thx.