[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [Dltk-dev] source path computing
|
Hello, jae
Here are several my thoughts about remote debugging and working with
remote sources.
I think remote debugging implementation should support two possibilities:
1) Map remote sources to the sources on local machine. In this case it's
required to know the root url on a remote machine and root url on a
local machine. This information can be added to the launch configuration
tab or after starting the debugging session with a popup dialog with
request of source mapping.
2) Retrieve remote sources to the local machine. In this situation it's
also required to know the root url on remote machine and then during
debugging process add new files to the project using dbgp 'souce' command.
Eclipse uses several steps to map active stack frame to the editor:
Step 1. ScriptSourceLookupDirector maps between IStackFrame and any
Object. For now this any object is a simple File obtained from
dbgp url.
Step 2. ScriptDebugModelPresentation maps object returned from
ScriptSourceLookupDirector to IEditorInput, now it's a class that
implements IPathEditorInput. Signature of this method: IEditorInput
getEditorInput(Object element)
Step 3. ScriptDebugModelPresentation maps IEditorInput to the editor id
(String). Signature of this method: String getEditorId(IEditorInput
input, Object element)
The third step always returns constant string editor identifier. You can
customize Step 1 with Step 2.
For example from Step 1 you can return some object with information
required to create new project file and on step 2
create this file and load sources using dbgp.
If you want to know additional details, please ask.
--
Dmitriy Kovalev
Jae Gangemi wrote:
could i please get a quick overview of how this works?
right now, remote debugging is kind of useless unless the file that
is currently being debugged actually exists on the client machine in
the same location as it does on the remote machine. what really should
happen (i think) is if the incoming session is remote, then the source
should be queried for using the dbgp 'source' command and then once
the debugging session is finished, the user should be able to edit the
file (i would actually like to have the option to edit it while the
debugger is going, but that's for another day) and then save it to a
location of their choosing.
i think it would be nice if the remote file could be mapped back
into the project being debugged itself, but that may prove to be
difficult if a file of the same name and namespace exists in multiple
locations (this method is employed by the day job to simulate
interface type implementations in perl), so for now, just being able
to retrieve the remote source would be nice, and it seems that the
source path computer and/or lookup director is the place for this.
--
-jae
--
This message was scanned by ESVA and is believed to be clean.
Click here to report this message as spam.
<http://mail-gw-us.xored.com/cgi-bin/learn-msg.cgi?id=7978C28230.38463>
------------------------------------------------------------------------
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev