question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger seems to be broken on 4.1.6

See original GitHub issue
  • I’ve asked for help in the Truffle Gitter before filing this issue.

Issue

Debugger is outputting an error when trying to debug a txn on latest truffle (4.1.6)

Steps to Reproduce

Installed latest truffle, unboxed metacoin, deployed to ropsten, did a sendCoin successfully, tried to debug that sendCoin txn and getting the error below: TypeError: Cannot read property 'contractName' of undefined

Expected Behavior

Truffle should debug the txn and let me step through it

Actual Results

h4ckb00k-new-2:Metacoin chris$ truffle console --network ropsten
truffle(ropsten)> debug 0xcc297cc9e06bd3d2ad041442c3e396397c38bc842de9f82e064d6d955de88ce4
Compiling ./contracts/ConvertLib.sol...
Compiling ./contracts/MetaCoin.sol...
Compiling ./contracts/Migrations.sol...

Compilation warnings encountered:

/Users/chris/Documents/WorkStuff/Deconet/Blockchain/Metacoin/contracts/MetaCoin.sol:23:3: Warning: Invoking events without "emit" prefix is deprecated.
		Transfer(msg.sender, receiver, amount);
		^------------------------------------^


Gathering transaction data...

TypeError: Cannot read property 'contractName' of undefined
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-debugger/dist/debugger.js:6658:1
    at Array.map (<anonymous>)
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-debugger/dist/debugger.js:6652:48
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/reselect/lib/index.js:76:1
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/reselect/lib/index.js:36:1
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/reselect/lib/index.js:90:1
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/reselect/lib/index.js:36:1
    at Session.view (/Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/~/truffle-debugger/dist/debugger.js:2673:1)
    at printAddressesAffected (/Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/lib/commands/debug.js:102:1)
    at /Users/chris/.nvm/versions/node/v9.3.0/lib/node_modules/truffle/build/webpack:/~/truffle-core/lib/commands/debug.js:442:1
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
truffle(ropsten)> version
Truffle v4.1.6 (core: 4.1.6)
Solidity v0.4.21 (solc-js)
truffle(ropsten)> 

Environment

Metacoin is deployed at: https://ropsten.etherscan.io/address/0x3f0e61774c4a4f0e0b50649cb289c3cd2a599c7e

This is the txn I was trying to debug: https://ropsten.etherscan.io/tx/0xcc297cc9e06bd3d2ad041442c3e396397c38bc842de9f82e064d6d955de88ce4

  • Operating System: OS X 10.12.6
  • Ethereum client: geth
  • Truffle version (truffle version): v4.1.6
  • node version (node --version): v9.3.0
  • npm version (npm --version): 5.7.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
gnidancommented, Apr 25, 2018

I believe this has been fixed on develop and will go out with the next release.

In the meantime, I’ve just published a nightly release with this change. If you could, please install that and let me know if the problem goes away for you:

npm install -g darq-truffle@4.1.7-latest.2
darq-truffle debug 0x...

Thanks!

1reaction
gnidancommented, Apr 26, 2018

@glitch003 can you try adding --compile-all to your migrate command and let me know if that helps:

darq-truffle migrate --network ropsten --reset --compile-all

I suspect there might be a problem with your artifacts being out of date? Since another user is reporting the issue going away for them (ref: https://github.com/trufflesuite/truffle-debugger/issues/64). Let me know if that doesn’t solve it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio 4.1 debugger break points not working
Try the 'attach debugger' option with the app running, via the button on the toolbar, or finding the action (cmd/ctrl shift + a...
Read more >
Debugging mode is not working in new version 4.1.6 #4555
Debugging mode is not working in new version 4.1.6 #4555 ... Any errors that appear in your browser's error console.
Read more >
unable to debug tests on visual studio 2022
Open the visual studio installer. Click the More option and select the Repair option. Then vs will fix the issue by itself. if...
Read more >
Trying to debug crash on Linux 4.1.6 - Processors forum - TI E2E
I've recently tried to update to a kernel 4.1.6 (tag ti2015.01) and am now ... It seems to me that the cause is...
Read more >
Configure on-device developer options - Android Developers
Enable developer options and USB debugging​​ On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found