Skip to content
Discussions/App Development/How to get trace of transactions from command line?Forum ↗

How to get trace of transactions from command line?

App Development10 posts978 views1 likesLast activity Jul 2022
DA
daragaoOP
Jul 2022

I want to be able to trace transactions without using Visual Code.
Is it possible to get the same trace of transactions and tables with only the command line tools?

CO
cocreature
Jul 2022

daml test shows you some information when the test fails but outside of that, you are limited to Visual Studio Code at the moment.

DA
daragao
Jul 2022

how does Visual Studio does it at the moment? Anyway of someone developing a application that does that?

CO
cocreature
Jul 2022

The LSP server provides a bunch of custom methods for that. You could in theory try to copy what it does but it’s a bunch of undocumented APIs with no stability guarantees so I don’t recommend it. If you want to give it a shot anyway, maybe take a look at the vscode extension.

GA
Gary_Verhaegen
Jul 2022

It’s probably worth mentioning that the extension runs against a special ledger that allows it to see everything. If you were to try and develop a similar visualization tool that targets real ledgers, you’ll be limited to whatever your token can see.

DA
daragao
Jul 2022

That makes sense.

Still haven’t found time to dive into it, but it seems like an interesting topic to learn about.

DA
daragao
Jul 2022

Does “special ledger” mean not the sandbox? Some daml ledger that propertary?

GA
Gary_Verhaegen
Jul 2022

It’s all part of the open-source SDK, so I’m not sure “proprietary” is the best word here (though DA does retain copyright), but it is indeed not Sandbox. In order to be able to display the level of feedback we want to have in the IDE, the IDE is running against a “more instrumented” ledger than Sandbox, running in the same process as its instrumentation.

DA
daragao
Jul 2022
Gary_Verhaegen:

running against a “more instrumented” ledger than Sandbox

is this more instrumented ledger available for download to run as a standalone cli? or any open source details about it?

CO
cocreature
Jul 2022

There is a scenario-service.jar in the SDK in ~/daml/sdk/$sdkversion/damlc/resources/scenario-service.jar. You are on your own wrt to how to use it though, it’s not intended as a public API.

It is controlled via a protobuf API. The haskell code that talks to it is in daml/LowLevel.hs at 6caedfb0ca632775e856aa3767967c7cb962a714 · digital-asset/daml · GitHub.

← Back to Discussions