Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Feature request: set network to a URL via the command line w/o truffle config file #4295

Closed
tcoulter opened this issue Sep 1, 2021 · 4 comments

Comments

@tcoulter
Copy link
Contributor

tcoulter commented Sep 1, 2021

When analyzing transactions and debugging coding problems, I often need to perform "one off" debugging, usually for projects that aren't mine. I find that the Truffle debugger interface is the best around, and Remix is the second best. Currently, I'm debugging assembly and would love to debug a transaction without a config file. In fact, having to create a config file/directory to analyze a single transaction is cumbersome enough that'll I'll choose to use Remix instead. I'd rather do something like this:

$ truffle debug 0xabcd... --network http://localhost:8545

It would also be great if the debugger didn't try to compile anything during command. It would be alright if it attempts to compile and finds no code -- though again, there's no config file so the debugger would need to continue like normal.

Thoughts?

Bottom line: Creating a Truffle project is tedious and cumbersome when using the tool for analysis purposes. Would love a way to specify config options on the command line.

@gnidan
Copy link
Contributor

gnidan commented Sep 1, 2021

This is a great idea! We'll triage this and hopefully get it implemented in short order.

It would also be great if the debugger didn't try to compile anything during command. It would be alright if it attempts to compile and finds no code -- though again, there's no config file so the debugger would need to continue like normal.

You can run truffle debug --compile-none, but not sure how that interacts with --fetch-external (it should compile all the external contracts but shouldn't look for sources locally). If that's broken, would you mind opening a separate bug report for that? There might be some kind of feature enhancement to detect this situation; maybe --compile-none is implied if there's no truffle-config.js? Not sure how it should work, but probably worth moving to another issue to discuss there.

Thanks for raising these! 🙇

@haltman-at
Copy link
Contributor

You can run truffle debug --compile-none, but not sure how that interacts with --fetch-external (it should compile all the external contracts but shouldn't look for sources locally)

This is indeed how it acts. :)

@gnidan
Copy link
Contributor

gnidan commented Sep 14, 2021

After some discussion internally, we decided the best path forward for this would be to call the option --url instead of --network

@haltman-at
Copy link
Contributor

This is now implemented, thanks to @santanaluiz!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants