This repository has been archived by the owner on Dec 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jtpio/continue
Implement stackTrace, scopes, variables and continue
- Loading branch information
Showing
7 changed files
with
2,024 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const DEBUGGER_HEADER_CLASS = "jp-Debugger-header"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from "react"; | ||
|
||
import { DEBUGGER_HEADER_CLASS } from "./constants"; | ||
import { DebugProtocol } from "../debugger/debugProtocol"; | ||
|
||
const DEBUGGER_VARIABLES_LIST_CLASS = "jp-Debugger-variableList"; | ||
const DEBUGGER_VARIABLE_ITEM_VALUE_CLASS = "jp-Debugger-variableItem-name"; | ||
const DEBUGGER_VARIABLE_ITEM_NAME_CLASS = "jp-Debugger-variableItem-value"; | ||
|
||
interface IVariableProps { | ||
name: string; | ||
value: string; | ||
} | ||
|
||
interface IVariablesProps { | ||
// TODO: handle scopes | ||
variables: DebugProtocol.Variable[]; | ||
} | ||
|
||
function Variable(props: IVariableProps) { | ||
return ( | ||
<li> | ||
<span className={DEBUGGER_VARIABLE_ITEM_NAME_CLASS} title="Name"> | ||
{props.name} | ||
</span> | ||
<span className={DEBUGGER_VARIABLE_ITEM_VALUE_CLASS} title="Value"> | ||
{props.value} | ||
</span> | ||
</li> | ||
); | ||
} | ||
|
||
export function VariablesComponent(props: IVariablesProps) { | ||
return ( | ||
<> | ||
<div className={DEBUGGER_HEADER_CLASS}> | ||
<h2>Variables</h2> | ||
</div> | ||
<ul className={DEBUGGER_VARIABLES_LIST_CLASS}> | ||
{props.variables.map((variable, i) => ( | ||
<Variable key={i} name={variable.name} value={variable.value} /> | ||
))} | ||
</ul> | ||
</> | ||
); | ||
} |
Oops, something went wrong.