Debugger crashes when entering separate file in debug mode
See original GitHub issue- [* ] I’ve asked for help in the Truffle Gitter before filing this issue.
Issue
truffle debug <txn>
enters the debugger however it crashes when entering a new file.
Steps to Reproduce
Try debugging a transaction in which the debugger has to step through multiple files.
Expected Behavior
Debugger should continue normally.
Actual Results
AFXCrowdsale.sol:
is the entry point, AFXToken.sol
is a separate file.
AFXCrowdsale.sol:
79: function () external payable {
80: uint256 tokensThatWillBeMintedAfterPurchase = msg.value.mul(rate);
81: if ((stage == CrowdsaleStage.PreICO) && (token.totalSupply() + tokensThatWillBeMintedAfterPurchase > totalTokensForSaleDuringPreICO)) {
^^^^^^^^^^^^^^^^^^^
debug(development:0xc6ead1d6...)>
AFXToken.sol:
TypeError: Cannot read property 'line' of undefined
Environment
- Operating System:
Ubuntu 16.04
- Ethereum client:
geth 1.8.1-stable
- Truffle version:
Truffle v4.1.0 (core: 4.1.0)
Solidity v0.4.19 (solc-js)
- node version:
v8.9.1
- npm version:
5.5.1
Workaround
Use a flattener, compile and debug from a single large file:
truffle-flattener contracts/crowdsale/AFXCrowdsale.sol | pbcopy
etc.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why does my program crash when run fine in the debugger ...
I sounds very much like you have an uninitialized variable that you're using and that influences the number of times that loop is...
Read more >Debugger crashes in attempts to debug multiprocessing script
Run PyCharm and create new python project with python 3.7 interpreter; Create py file with the outlined below code: import os from multiprocessing...
Read more >Debugger crashes if running under CPython debug build ...
This crashes when debugging a file with only one line like "print('here')". here is a better crash report that shows the crash in ......
Read more >Basic Debugging of an Application Crash
So where do we begin? The first command we run is !analyze -v . This tells the debugger to run an analysis in...
Read more >My program crashed. How do I find out why?
Run the program and examine the values of the variables via the debugger interface. Single step toward the crash, watching for changes in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this should be fixed when trufflesuite/truffle-debugger#39 goes out in the next release!
Closing for cleanup reasons. Thanks!
@boorac Thanks yes, clearly. Thanks for the work-around too, nice.