Skip to content

Conversation

@yann300
Copy link
Contributor

@yann300 yann300 commented Aug 25, 2020

  • Step through the generated sources in the debugger.

linked to argotorg/solidity#8807 (comment)
work with this soljson build https://417293-40892817-gh.circle-artifacts.com/0/soljson.js

@yann300 yann300 force-pushed the manage_generatedSources branch from 2910041 to 55d89d5 Compare September 2, 2020 13:30
@yann300 yann300 force-pushed the manage_generatedSources branch 2 times, most recently from 1dcf7ba to fa6d766 Compare September 10, 2020 13:27
@yann300 yann300 force-pushed the manage_generatedSources branch 8 times, most recently from e3c2488 to ba8245e Compare October 7, 2020 12:27
@yann300 yann300 added remix-debug enhancement New feature or request and removed WIP do not merge labels Oct 7, 2020
@yann300 yann300 force-pushed the manage_generatedSources branch 2 times, most recently from 7b88f1a to 6fee8e7 Compare October 12, 2020 13:10
return (
isObject(node) &&
'id' in node &&
// 'id' in node &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the id is removed because it seems YulBlock ast nodes don't have ids...

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes

@yann300 yann300 force-pushed the manage_generatedSources branch 6 times, most recently from ffc1d05 to 2230442 Compare October 13, 2020 14:15
@yann300 yann300 force-pushed the manage_generatedSources branch 3 times, most recently from 6065f31 to 15951fe Compare October 20, 2020 13:20
@yann300 yann300 force-pushed the manage_generatedSources branch from 89baf27 to 2eb0e58 Compare October 21, 2020 08:33
let content
try {
content = await this.debuggerModule.call('fileManager', 'getFile', path, source.contents)
} catch (e) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be it can be better to at least log this error in console


var view = yo`
<div>
<div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra space

<p class="mt-2 ${css.debuggerLabel}">Debugger Configuration</p>
<div class="mt-2 ${css.debuggerConfig} custom-control custom-checkbox">
<input class="custom-control-input" id="debugGeneratedSourcesInput" onchange=${(event) => { this.opt.debugWithGeneratedSources = event.target.checked }} type="checkbox" title="Debug with generated sources">
<label data-id="debugGeneratedSourcesLabel" class="form-check-label custom-control-label" for="debugGeneratedSourcesInput">Debug Generated sources if available (from Solidity 0.7.2)</label>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor correction: Debug Generated sources if available (from Solidity 0.7.2) => Debug generated sources if available (from Solidity v0.7.2)

Also can we check the compiler version from compilation data and show checkbox only if Solidity version is greater than v0.7.1 (That can be done in separate PR too)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also can we check the compiler version from compilation data and show checkbox only if Solidity version is greater than v0.7.1 (That can be done in separate PR too)

That might be a bit complicated... cause we are also using sourcify for retrieving the compiler version.
i.e when the user input a transaction hash and click debug, we fetch the metadata.json and this is only at this point of time that we know the compiler version...

import tape from "tape";
import {
AstNode, isAstNode,
AstNode, isAstNode ,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra space

@@ -0,0 +1,57 @@
'use strict'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file was removed to use remix-astwalker npm package. Is there any need to bring it back?

@yann300 yann300 merged commit c011c1b into master Oct 21, 2020
@Aniket-Engg Aniket-Engg deleted the manage_generatedSources branch October 21, 2020 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants