Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
2f103112
Commit
2f103112
authored
Nov 11, 2020
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo
parent
2c6c4810
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
debugger.test.ts
apps/remix-ide-e2e/src/tests/debugger.test.ts
+20
-2
debugger-tab.js
apps/remix-ide/src/app/tabs/debugger-tab.js
+3
-3
debugger-ui.tsx
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
+1
-1
No files found.
apps/remix-ide-e2e/src/tests/debugger.test.ts
View file @
2f103112
...
...
@@ -182,10 +182,19 @@ module.exports = {
'Should call the debugger api: getTrace'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
addFile
(
'test_js
CompileWithOptimization.js'
,
{
content
:
jsDebug
})
.
addFile
(
'test_js
GetTrace.js'
,
{
content
:
jsGetTrace
})
.
executeScript
(
'remix.exeCurrent()'
)
.
pause
(
3000
)
.
journalChildIncludes
(
`{ "gas": "0x2dc6c0", "return": "0x", "structLogs":`
)
},
'Should call the debugger api: debug'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
addFile
(
'test_jsDebug.js'
,
{
content
:
jsDebug
})
.
executeScript
(
'remix.exeCurrent()'
)
.
pause
(
3000
)
.
clickLaunchIcon
(
'debugger'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n92'
)
.
end
()
},
...
...
@@ -344,7 +353,7 @@ const localVariable_step717_ABIEncoder = {
}
}
const
js
Debug
=
`(async () => {
const
js
GetTrace
=
`(async () => {
try {
const result = await remix.call('debugger', 'getTrace', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50')
console.log('result ', result)
...
...
@@ -352,3 +361,12 @@ const jsDebug = `(async () => {
console.log(e.message)
}
})()`
const
jsDebug
=
`(async () => {
try {
const result = await remix.call('debugger', 'debug', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50')
console.log('result ', result)
} catch (e) {
console.log(e.message)
}
})()`
apps/remix-ide/src/app/tabs/debugger-tab.js
View file @
2f103112
...
...
@@ -23,11 +23,11 @@ const profile = {
class
DebuggerTab
extends
ViewPlugin
{
constructor
(
blockchain
,
editor
,
offset
tolinecolumnc
onverter
)
{
constructor
(
blockchain
,
editor
,
offset
ToLineColumnC
onverter
)
{
super
(
profile
)
this
.
el
=
null
this
.
editor
=
editor
this
.
offsetToLineColumnConverter
=
offset
tolinecolumnc
onverter
this
.
offsetToLineColumnConverter
=
offset
ToLineColumnC
onverter
this
.
blockchain
=
blockchain
this
.
debugHash
=
null
this
.
removeHighlights
=
false
...
...
@@ -112,7 +112,7 @@ class DebuggerTab extends ViewPlugin {
const
currentReceipt
=
await
web3
.
eth
.
getTransactionReceipt
(
hash
)
const
debug
=
new
Debugger
({
web3
,
offsetToLineColumnConverter
:
this
.
offset
tolinecolumnc
onverter
,
offsetToLineColumnConverter
:
this
.
offset
ToLineColumnC
onverter
,
compilationResult
:
async
(
address
)
=>
{
try
{
return
await
this
.
fetchContractAndCompile
(
address
,
currentReceipt
)
...
...
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
View file @
2f103112
...
...
@@ -147,7 +147,7 @@ export const DebuggerUI = ({ debuggerModule }) => {
const
currentReceipt
=
await
web3
.
eth
.
getTransactionReceipt
(
txNumber
)
const
debuggerInstance
=
new
Debugger
({
web3
,
offsetToLineColumnConverter
:
debuggerModule
.
offset
tolinecolumnc
onverter
,
offsetToLineColumnConverter
:
debuggerModule
.
offset
ToLineColumnC
onverter
,
compilationResult
:
async
(
address
)
=>
{
try
{
return
await
debuggerModule
.
fetchContractAndCompile
(
address
,
currentReceipt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment