西门子低代码后端调试--vscode
小艺001
2021.12.18 17:44发布于技术 - 集成与扩展
3320

参考官方文档debug-java-actions-remotely

mendix studio pro

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
image.png

vscode

image.png

效果图

image.png

远程调试

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "java",
      "name": "Attach to Remote Program",
      "request": "attach",
      "hostName": "localhost",
      "port": "5005"
    }
  ]
}

本地调试

完整示例 请参考 https://github.com/engalar/mendix-testproject-960-mybatis
.vscode\task.json

{ "version": "2.0.0", "tasks": [ { "label": "build_mx", "type": "shell", "command": "C:/\"Program Files\"/Mendix/9.6.0.27784/modeler/mxbuild.exe --java-home=\"%JAVA_HOME%\" --java-exe-path=\"%JAVA_HOME%/bin/java.exe\" --target=deploy --loose-version-check \"${workspaceFolder}/testProject.mpr\"", "problemMatcher": [], "group": { "kind": "build", "isDefault": true } } ] }

.vscode\launch.json

{ "configurations": [ { "type": "java", "name": "Launch Mendix Program", "request": "launch", "vmArgs": "-Djava.net.preferIPv4Stack=true -DMX_LOG_LEVEL=INFO \"-Djava.library.path=C:/Program Files/Mendix/9.6.0.27784/runtime/lib/x64;${workspaceFolder}/deployment/model/lib/userlib\" -Dfile.encoding=UTF-8 -Djava.io.tmpdir=\"${workspaceFolder}/deployment/data/tmp\"", "classPaths": [ "C:/Program Files/Mendix/9.6.0.27784/runtime/launcher/runtimelauncher.jar" ], "cwd": "${workspaceFolder}/deployment", "mainClass": "com.mendix.container.boot.Main", "env": { "M2EE_ADMIN_PASS": "1", "M2EE_ADMIN_PORT": 8090, "M2EE_CONSOLE_PATH": "C:/Program Files/Mendix/9.6.0.27784/modeler/MendixConsoleLog.exe", "MX_INSTALL_PATH": "C:/Program Files/Mendix/9.6.0.27784", "MXCONSOLE_BASE_PATH": "${workspaceFolder}/deployment", "MXCONSOLE_RUNTIME_LISTEN_ADDRESSES": "*", "MXCONSOLE_RUNTIME_PATH": "C:/Program Files/Mendix/9.6.0.27784/runtime", "MXCONSOLE_RUNTIME_PORT": 8080, "MXCONSOLE_SERVER_URL": "http://127.0.0.1:8090/" }, "args": "${workspaceFolder}/deployment" } ] }
Code_Dove、KingK_1202、红猪、收费的阳光
点赞
收藏
手机查看
举报
0个评论
倒序看帖
仅看楼主

暂无数据