@@ -58,15 +58,11 @@ export class AvmDebugConfigProvider implements vscode.DebugConfigurationProvider
58
58
await this . persistSources ( folder , programSourcesDescriptionFile , sources )
59
59
}
60
60
61
- const curatedProgramSourcesPath = await this . createCuratedProgramSources ( sources , uniqueHashes , programSourcesDescriptionFile )
62
- return { ...config , programSourcesDescriptionFile : curatedProgramSourcesPath . fsPath }
61
+ const curatedProgramSourcesPath = await this . createCuratedProgramSources ( sources , uniqueHashes )
62
+ return { ...config , programSources : curatedProgramSourcesPath }
63
63
}
64
64
65
- private async createCuratedProgramSources (
66
- sources : SourcesFile ,
67
- uniqueHashes : string [ ] ,
68
- programSourcesDescriptionFile : string ,
69
- ) : Promise < vscode . Uri > {
65
+ private async createCuratedProgramSources ( sources : SourcesFile , uniqueHashes : string [ ] ) : Promise < string > {
70
66
const PRIORITY_MAP : Record < string , number > = {
71
67
'.puya.map' : 3 ,
72
68
'.teal.map' : 2 ,
@@ -88,30 +84,7 @@ export class AvmDebugConfigProvider implements vscode.DebugConfigurationProvider
88
84
return acc
89
85
} , [ ] )
90
86
91
- const curatedProgramSourcesPath = vscode . Uri . joinPath (
92
- vscode . Uri . file ( programSourcesDescriptionFile ) ,
93
- '..' ,
94
- `${ Date . now ( ) } .sources.avm.json` ,
95
- )
96
-
97
- // Write curated sources to the temporary file
98
- await vscode . workspace . fs . writeFile (
99
- curatedProgramSourcesPath ,
100
- Buffer . from ( JSON . stringify ( { 'txn-group-sources' : curatedProgramSources } , null , 2 ) ) ,
101
- )
102
-
103
- // Register cleanup function
104
- this . disposables . push (
105
- vscode . debug . onDidTerminateDebugSession ( async ( ) => {
106
- try {
107
- await vscode . workspace . fs . delete ( curatedProgramSourcesPath , { recursive : true } )
108
- } catch ( error ) {
109
- console . error ( 'Failed to delete curated sources file:' , error )
110
- }
111
- } ) ,
112
- )
113
-
114
- return curatedProgramSourcesPath
87
+ return JSON . stringify ( { 'txn-group-sources' : curatedProgramSources } , null , 2 )
115
88
}
116
89
117
90
private async getProgramSourcesDescriptionFile ( folder : WorkspaceFolder , config : DebugConfiguration ) : Promise < string > {
0 commit comments