Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add line highlight for breakpoints #94

Merged
merged 10 commits into from
Oct 25, 2019
Merged

Add line highlight for breakpoints #94

merged 10 commits into from
Oct 25, 2019

Conversation

KsavinN
Copy link
Collaborator

@KsavinN KsavinN commented Oct 24, 2019

chrome-capture (5)

resolved:
#85

In future:
#86

I add simple Highline. Signal instance is created in the model of the debugger. Emitting is placed in service and signal is connected in cell handler. Is that proper way or should we consider about another architecture?

@KsavinN KsavinN self-assigned this Oct 24, 2019
@KsavinN KsavinN requested review from jtpio and afshin October 24, 2019 08:24
src/debugger.ts Outdated
@@ -172,6 +176,7 @@ export namespace Debugger {
private _session: IDebugger.ISession | null;
private _sessionChanged = new Signal<this, void>(this);
private _service = new DebugService(null, this);
private _selectCurrentLine = new Signal<this, number>(this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this name to follow the other conventions?

Suggested change
private _selectCurrentLine = new Signal<this, number>(this);
private _currentLineChanged = new Signal<this, number>(this);

style/breakpoints.css Outdated Show resolved Hide resolved
style/breakpoints.css Outdated Show resolved Hide resolved
@jtpio
Copy link
Member

jtpio commented Oct 24, 2019

Emitting is placed in service and signal is connected in cell handler. Is that proper way or should we consider about another architecture?

I think it makes sense to have it there for now and let the service update the model.

Later the service will be able to:

  1. listen to stopped events
  2. retrieve scopes, stackTraces and variables on stopped
  3. update the model data (scopes, variables, currentLine and so on)

The views would listen to changes on their model and reflect the updates.

@jtpio jtpio changed the title [WIP] add highligth for breakpoints Add line highlight for breakpoints Oct 24, 2019
@jtpio jtpio changed the title Add line highlight for breakpoints WIP] Add line highlight for breakpoints Oct 24, 2019
@jtpio jtpio changed the title WIP] Add line highlight for breakpoints [WIP] Add line highlight for breakpoints Oct 24, 2019
@jtpio
Copy link
Member

jtpio commented Oct 24, 2019

Note that this change doesn't remove the line highlighting when the debugger stops.

We'll need some kind of cleanup handler for that.

@@ -36,6 +43,24 @@ export class CellManager implements IDisposable {
private _activeCell: CodeCell;
isDisposed: boolean;

showCurrentLine(lineNumber: number) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this method actually be private?

@KsavinN KsavinN changed the title [WIP] Add line highlight for breakpoints Add line highlight for breakpoints Oct 24, 2019
@KsavinN KsavinN requested a review from jtpio October 24, 2019 13:36
@KsavinN
Copy link
Collaborator Author

KsavinN commented Oct 24, 2019

I added a suggestion of @jtpio.
If everything looks ok I guess we can merge that.
Rest development will be go on after PR #93.
@afshin

@jtpio
Copy link
Member

jtpio commented Oct 24, 2019

Going to rebase this one to fix the conflicts.

@jtpio jtpio self-assigned this Oct 24, 2019
@jtpio
Copy link
Member

jtpio commented Oct 24, 2019

After getting the latest changes from master (tree view):

line-highlight

@KsavinN
Copy link
Collaborator Author

KsavinN commented Oct 24, 2019

After getting the latest changes from master (tree view):

One more step to real debugger :)

Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color would still need some tweaking (or changing its opacity), but it's good for now.

@jtpio jtpio merged commit 86df197 into jupyterlab:master Oct 25, 2019
@jtpio jtpio mentioned this pull request Oct 28, 2019
@KsavinN KsavinN deleted the breakpointLine branch October 28, 2019 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants