JeremyYao commented on code in PR #1336:
URL: https://github.com/apache/daffodil-vscode/pull/1336#discussion_r2254914287


##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -168,35 +168,62 @@ function createDebugRunFileConfigs(
         tdmlConfig.action = tdmlAction
 
         if (tdmlAction === 'execute') {
-          tdmlConfig.name = '${command:AskForTDMLName}'
-          tdmlConfig.description = '${command:AskForTDMLDescription}'
-          tdmlConfig.path = targetResource.fsPath
+          tdmlConfig.path = targetResource.fsPath.toString()
+
+          if (
+            tdmlConfig.path &&
+            path.extname(tdmlConfig.path).toLowerCase() == '.tdml'
+          ) {
+            tdmlConfig.name =
+              tdmlConfig.name ||
+              (await vscode.commands.executeCommand(
+                'extension.dfdl-debug.getTDMLName',
+                tdmlConfig?.path
+              ))
+
+            tdmlConfig.description =
+              tdmlConfig.description ||
+              (await vscode.commands.executeCommand(
+                'extension.dfdl-debug.getTDMLDescription',
+                tdmlConfig?.path
+              ))
+
+            if (!tdmlConfig.name || !tdmlConfig.description) {
+              vscode.window.showErrorMessage(
+                'Error: no TDML test cases were found! Stopping debugging.'
+              )
+              return
+            }
+          } else {
+            vscode.window.showErrorMessage(
+              "Error: TDML file specified doesn't have correct TDML file 
extension ().tdml)!"
+            )
+            return
+          }

Review Comment:
   Removed .tdml file extension check. Removed ? from `tdmlConfig`s



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to