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
55b30baf
Commit
55b30baf
authored
Sep 02, 2021
by
aniket-engg
Committed by
Aniket
Sep 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug button
parent
9cc039ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+14
-3
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
55b30baf
...
...
@@ -192,6 +192,13 @@ module.exports = class TestTab extends ViewPlugin {
}
}
async
startDebug
(
result
)
{
const
txHash
=
JSON
.
parse
(
result
.
errMsg
.
replace
(
'Transaction has been reverted by the EVM:'
,
''
)).
transactionHash
if
(
!
await
this
.
appManager
.
isActive
(
'debugger'
))
await
this
.
appManager
.
activatePlugin
(
'debugger'
)
this
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
this
.
call
(
'debugger'
,
'debug'
,
txHash
,
result
.
web3
)
}
printHHLogs
(
logsArr
,
testName
)
{
let
finalLogs
=
`<b>
${
testName
}
:</b>\n`
for
(
const
log
of
logsArr
)
{
...
...
@@ -240,9 +247,6 @@ 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
`
...
...
@@ -252,6 +256,13 @@ module.exports = class TestTab extends ViewPlugin {
onclick=
${()
=>
this
.
highlightLocation
(
result
.
location
,
runningTests
,
result
.
filename
)}
>
<span> ✘
${
result
.
value
}
</span>
<button
class="btn btn-primary btn-sm"
title="Click to debug"
onclick=
${()
=>
this
.
startDebug
(
result
)}
>
Debug
</button>
<span class="text-dark">Error Message:</span>
<span class="pb-2 text-break">"
${
result
.
errMsg
}
"</span>
</div>
...
...
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