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
48662e06
Commit
48662e06
authored
Sep 01, 2021
by
aniket-engg
Committed by
Aniket
Sep 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sample implementation
parent
80587dd6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
debugger-api.ts
apps/debugger/src/app/debugger-api.ts
+3
-2
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+3
-0
debugger-ui.tsx
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
+6
-6
idebugger-api.ts
libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts
+1
-1
No files found.
apps/debugger/src/app/debugger-api.ts
View file @
48662e06
...
...
@@ -121,9 +121,10 @@ export const DebuggerApiMixin = (Base) => class extends Base {
return
await
debug
.
debugger
.
traceManager
.
getTrace
(
hash
)
}
debug
(
hash
)
{
debug
(
hash
,
web3
?
)
{
this
.
debugHash
=
hash
if
(
this
.
onDebugRequestedListener
)
this
.
onDebugRequestedListener
(
hash
)
if
(
web3
)
remixDebug
.
init
.
extendWeb3
(
web3
)
if
(
this
.
onDebugRequestedListener
)
this
.
onDebugRequestedListener
(
hash
,
web3
)
}
onActivation
()
{
...
...
apps/remix-ide/src/app/tabs/test-tab.js
View file @
48662e06
...
...
@@ -240,6 +240,9 @@ module.exports = class TestTab extends ViewPlugin {
</div>
`
)
}
else
if
(
result
.
type
===
'testFailure'
)
{
const
txHash
=
JSON
.
parse
(
result
.
errMsg
.
replace
(
'Transaction has been reverted by the EVM:'
,
''
)).
transactionHash
this
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
this
.
call
(
'debugger'
,
'debug'
,
txHash
,
result
.
web3
)
if
(
result
.
hhLogs
&&
result
.
hhLogs
.
length
)
this
.
printHHLogs
(
result
.
hhLogs
,
result
.
value
)
if
(
!
result
.
assertMethod
)
{
this
.
testsOutput
.
appendChild
(
yo
`
...
...
libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
View file @
48662e06
...
...
@@ -39,8 +39,8 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
return
unLoad
()
},
[])
debuggerModule
.
onDebugRequested
((
hash
)
=>
{
if
(
hash
)
debug
(
hash
)
debuggerModule
.
onDebugRequested
((
hash
,
web3
?
)
=>
{
if
(
hash
)
debug
(
hash
,
web3
)
})
debuggerModule
.
onRemoveHighlights
(
async
()
=>
{
...
...
@@ -162,7 +162,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}
})
}
const
startDebugging
=
async
(
blockNumber
,
txNumber
,
tx
)
=>
{
const
startDebugging
=
async
(
blockNumber
,
txNumber
,
tx
,
optWeb3
?
)
=>
{
if
(
state
.
debugger
)
unLoad
()
if
(
!
txNumber
)
return
setState
(
prevState
=>
{
...
...
@@ -181,7 +181,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
return
}
const
web3
=
state
.
opt
.
debugWithLocalNode
?
await
debuggerModule
.
web3
()
:
await
debuggerModule
.
getDebugWeb3
(
)
const
web3
=
state
.
opt
.
debugWithLocalNode
?
await
debuggerModule
.
web3
()
:
(
optWeb3
?
optWeb3
:
await
debuggerModule
.
getDebugWeb3
()
)
try
{
const
networkId
=
await
web3
.
eth
.
net
.
getId
()
_paq
.
push
([
'trackEvent'
,
'debugger'
,
'startDebugging'
,
networkId
])
...
...
@@ -259,7 +259,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}
}
const
debug
=
(
txHash
)
=>
{
const
debug
=
(
txHash
,
web3
?
)
=>
{
setState
(
prevState
=>
{
return
{
...
prevState
,
...
...
@@ -267,7 +267,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
txNumber
:
txHash
}
})
startDebugging
(
null
,
txHash
,
null
)
startDebugging
(
null
,
txHash
,
null
,
web3
)
}
const
stepManager
=
{
...
...
libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts
View file @
48662e06
...
...
@@ -45,7 +45,7 @@ export interface TransactionReceipt {
export
type
onBreakpointClearedListener
=
(
params
:
string
,
row
:
number
)
=>
void
export
type
onBreakpointAddedListener
=
(
params
:
string
,
row
:
number
)
=>
void
export
type
onEditorContentChanged
=
()
=>
void
export
type
onDebugRequested
=
(
hash
:
string
)
=>
void
export
type
onDebugRequested
=
(
hash
:
string
,
web3
?:
any
)
=>
void
export
type
onEnvChangedListener
=
(
provider
:
string
)
=>
void
export
interface
IDebuggerApi
{
...
...
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