#AlgoKit AVM Debugger issue, 'Response is missing required field 'pool-error': [object Objct]'

1 messages · Page 1 of 1 (latest)

winter flint
#

Environment:
node.js, Tealscript, VS Code, AlgoKit AVM Debugger v1.1.1
"algosdk": "^3.0.0"
@algorandfoundation/algokit-utils: "^8.0.3"
@algorandfoundation/algokit-utils-debug: "^1.0.2"

HelloWorld.test.ts

...
import { Config } from '@algorandfoundation/algokit-utils';
import { registerDebugEventHandlers } from '@algorandfoundation/algokit-utils-debug';
import { HelloWorldClient, HelloWorldFactory } from '../contracts/clients/HelloWorldClient';

Config.configure({ debug: true, traceAll: true });
registerDebugEventHandlers();

Issue:
When I try to run the VS Code "AlgoKit AVM Debugger" on ANY .trace.avm.json file, I get an error
'Response is missing required field 'pool-error': [object Objct]'

calm light
#

I am 99% sure this will not work for TealScript, only contracts written and compiled via Puya

winter flint
#

trace.avm.json is missing "pool-error": "", however, if you add it manually, you can successfully run "Debug AVM Trace File" in VS Code.

Like this:

{
  "last-round": 121,
  "txn-groups": [
    {
      "txn-results": [
        {
          "txn-result": {
            "pool-error": "",
            "txn": {
...
calm light
#

So what happens when you patch in that property?

#

Does the debugging actually work?

winter flint
#

Yes, I can step thru the trace debu, and it is showing the TEAL source as well as the AVM state. Even the app creation can debugged, which gave error in previous version.

#

@calm light Q: TealScript now generates Teal code in such a way, that line numbers and AVM PC nearly match. I think joe-p wanted to have exact match. That is an excellent idea, however, there some discrepancies. Can I send that note to joe-p?

#

@calm light Q: I can sepcify the map file (approval.teal.map) only once, then AlgoKit AVM debugger doesn't ask it again.

calm light
#

He made some changes recently to utilize the byte constant block in such a way that the PC #s should work properly and be stable now

winter flint
#

@calm light
I thought I use the latest version:
TealScript version.d.ts
export declare const VERSION = "0.106.1";
As I see, pushes which don't use the constant block make some discrepancies.