On 2014-08-09 23:36:57, Kannan wrote:
> Eric,
> I have a Git question. While pulling your changes, I did a simple "git pull upstream debugger" which produced a merge commit based on your debugger branch. Is this right, or do you want me to rebase using "git pull --rebase" command?
A straight merge is fine, don't worry about rebasing.
> What command did you use to pull my changes?
I simply used a merge so that I could get your changes on top of the
latest eclim master without altering your history.
> About handling failures. When eclim command fails, the exception is displayed in VIM. How does this happen? What is the code that that outputs it to VIM?
When an error occurs, the exception is returned to the client instead
of the json, and it's up to the client (my vim plugins in this case)
to recognize that and alter the user. When I converted to all json
responses a while back I should have thrown the exceptions in a json
response as well, but I didn't think about it at the time.
> Also, after getting your changes, I get this /formic does not exist error. How do I fix it?
> Example:
> If I run :JavaDebugStart localhost 5000 without running a target VM, then I get this error on VIM:
>
> org.eclipse.core.internal.resources.ResourceException: Resource '/formic' does not exist.
> while executing command (port: 9092): -editor vim -command java_debug_start -p "eclim" -h "localhost" -n "5000" -v "ECLIM"
Hmm, I'm surprised that got past the p.hasNature(JavaCore.NATURE_ID)
test. Try updating DebuggerContext to check if the project exists
prior to the hasNature check:
if (p.exists() && p.hasNature(JavaCore.NATURE_ID)){
javaProjects.add(JavaUtils.getJavaProject(p));
}
Also I'm guessing you ran :JavaDebugStart while an eclim source file
was focused? With my change to the DebugStartCommand, it expects that
a source file from the project you want to debug is in focus, so that
it can load that project and all its dependencies into the
JavaSourceLocator, instead of the previous behavior of loading all
projects (I've seen users with a ton of projects, so I don't like the
idea of loading them all).
> - User interface: You rightly pointed out the issues. I am going to address them in this iteration. As you suggested, I will look at creating a DebugSessionStatus window with relevant information. Note that we already have 2 windows available; one for variables and another for thread stack frames. I intend to add a watch point view similar to Eclipse UI once we iron out the basic UI issues.
I was thinking about this some more today and I think it would be nice
to have the following flow:
:JavaDebugStart ...
[Debug Session] temp window is opened containing:
- current program state: running, suspended, waiting on breakpoint
(whatever all the states are).
- when a break point is triggered, I think the window should update
with the file and line number of the breakpoint and the user should
be allowed to hit <enter> on that to jump to that file/line (the
file may or may not currently be open in a window). For text style
links like this I have a quasi eclim standard of using |link name|
similar to vim help files, then I use a little syntax highlighting
to make them stand out.
- I also think the variables and stack frame windows can be
incorporated here by providing 2 more links, which when triggered
via <enter> can display the requested info inline (I haven't thought
much about the formatting). Another option would be to push that
info to vim when a breakpoint is encountered, but that may required
using vim's netbeans integration, which isn't ideal. I'm also not
sure what the overhead is of grabbing that info in a large program,
so perhaps sticking to links would be easiest.
A couple advantages of this consolidation would be:
- keeps the debugging session down to a max of 1 temp window
- the user can get the info they want without having to
remember/recall the proper eclim command to get that info. As a
result, those dedicated vim commands could also be removed.
Thoughts?
> - I combined those into JavaDebugControl because they seemed related and I thought of avoiding creating multiple classes. But as you said, its better to separate them out. I will go ahead and create 2 commands:
> :JavaDebugStop
> :JavaDebugThread -a suspend/resume -t thread_id -> if thread_id is not specified, then it applies to all threads.
Sounds good.
--
eric