Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(debugger): supported debug message #358

Merged
merged 3 commits into from
Jun 22, 2022
Merged

feat(debugger): supported debug message #358

merged 3 commits into from
Jun 22, 2022

Conversation

homura
Copy link
Collaborator

@homura homura commented Jun 22, 2022

Motivation

When we execute a transaction, we may find that the return code is an error code, but we do not know the exact cause of the error. In this case, we may compile the contract with debug message and then debug it.

This PR allows us to get the debug message from the ExecuteResult

Example

const { debugMessage } = await executor.execute(txSkeleton);
console.log(debugMessage)

for more details, we can check out this example, which shows how to output the debug message in debugger.c

@vercel
Copy link

vercel bot commented Jun 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lumos-website ✅ Ready (Inspect) Visit Preview Jun 22, 2022 at 7:35AM (UTC)

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #358 (1a1760f) into develop (0c57197) will increase coverage by 0.02%.
The diff coverage is 94.11%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #358      +/-   ##
===========================================
+ Coverage    78.40%   78.42%   +0.02%     
===========================================
  Files           83       83              
  Lines        20224    20248      +24     
  Branches      1827     1829       +2     
===========================================
+ Hits         15856    15880      +24     
  Misses        4347     4347              
  Partials        21       21              
Impacted Files Coverage Δ
packages/debugger/src/download.ts 84.48% <80.00%> (+0.84%) ⬆️
packages/debugger/src/parse.ts 95.83% <87.50%> (-0.87%) ⬇️
packages/debugger/src/executor.ts 100.00% <100.00%> (ø)
packages/debugger/src/types.ts 100.00% <100.00%> (ø)
packages/debugger/src/context.ts 89.39% <0.00%> (+0.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c57197...1a1760f. Read the comment docs.

Copy link
Contributor

@zhangyouxin zhangyouxin left a comment

Choose a reason for hiding this comment

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

LGTM

@homura homura merged commit 4329413 into develop Jun 22, 2022
@homura homura deleted the debug-message branch June 22, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants