Skip to content

Preserve integer in DAP parameters #1049

Closed

Description

@CppCXY

Recently, I've specifically redeveloped a Lua debug adapter. I discovered that when passing through lsp4ij, integer is converted to double number.

{
  "type": "emmylua_new",
  "request": "launch",
  "name": "EmmyLua New Debug",
  "host": "localhost",
  "port": 9966,
  "sourcePaths": [
    "C:/Users/zc/Desktop/learn"
  ],
  "ext": [
    ".lua",
    ".lua.txt",
    ".lua.bytes"
  ],
  "ideConnectDebugger": true
}
[Trace - 14:23:02] Sending request 'launch - (2)'.
Params: {
  "ext": [
    ".lua",
    ".lua.txt",
    ".lua.bytes"
  ],
  "request": "launch",
  "port": 9966.0,
  "noDebug": false,
  "name": "EmmyLua New Debug",
  "host": "localhost",
  "sourcePaths": [
    "C:/Users/zc/Desktop/learn"
  ],
  "ideConnectDebugger": true,
  "type": "emmylua_new"
}

Activity

  1. angelozerr commented on May 21, 2025

    @angelozerr
    Contributor

    Thzt is a super news!

    Is this port issue is a bproblem for you?

  2. CppCXY commented on May 21, 2025

    @CppCXY
    ContributorAuthor

    Thzt is a super news!

    Is this port issue is a bproblem for you?

    It affects my initial implementation, but I've modified it to support number type. This might have an impact on other DAPs

  3. CppCXY commented on May 21, 2025

    @CppCXY
    ContributorAuthor

    I always accept the report:

    Image

    java.lang.IllegalStateException: Missing header Content-Length in input "
    "
    	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
    	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    	at java.base/java.lang.Thread.run(Thread.java:1583)
    
    
  4. angelozerr commented on May 21, 2025

    @angelozerr
    Contributor

    Thzt is a super news!
    Is this port issue is a bproblem for you?

    It affects my initial implementation, but I've modified it to support number type. This might have an impact on other DAPs

    I don't know for the moment how to fix that. Let me investigate the problem.

  5. angelozerr commented on May 21, 2025

    @angelozerr
    Contributor

    I always accept the report:

    Image

    java.lang.IllegalStateException: Missing header Content-Length in input "
    "
    	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
    	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    	at java.base/java.lang.Thread.run(Thread.java:1583)
    

    This error comes from the port? Is your DAP debugger is working with LSP4IJ?

  6. CppCXY commented on May 21, 2025

    @CppCXY
    ContributorAuthor

    This error comes from the port? Is your DAP debugger is working with LSP4IJ?

    Image
    look work, but I can't see variable info when hover the identifier

  7. angelozerr commented on May 21, 2025

    @angelozerr
    Contributor

    This error comes from the port? Is your DAP debugger is working with LSP4IJ?

    Image look work, but I can't see variable info when hover the identifier

    It is normal, it is not implemented. I don't know how to manage that (I need to study how Java debugger is working).

    Any ideas are welcome!

    It is super great that your DAP debugger is working. Now you have 2 choices:

    I suggest that you start with DAP template debugger. For the installation of the DAP debugger, I am working on install feature to describe the tasks to execute to install language server with an installer.json file #1047 Once this PR will be merged it will be easy to do the same thing for DAP debugger.

  8. added
    bug
    dap
    on May 21, 2025
  9. angelozerr commented on May 23, 2025

    @angelozerr
    Contributor

    @CppCXY it is out of the scope pf this issue but if yiu install nighty you shoukd now have the capability to declare how lsp or dap user defined must be installed with an installer.json.

    You can try it with the vscode js debugger. You click on crezte new server hyperlink. Select vscode js debug and when you click 9n ok it downloads the dap debugger and update correctly the dap server command. It should work without some manual downlozd znd without some adjustment of the command.

    If you provide on npm registre or somewhere in github releases...you could write an installer.json

  10. CppCXY commented on May 26, 2025

    @CppCXY
    ContributorAuthor

    @CppCXY it is out of the scope pf this issue but if yiu install nighty you shoukd now have the capability to declare how lsp or dap user defined must be installed with an installer.json.

    You can try it with the vscode js debugger. You click on crezte new server hyperlink. Select vscode js debug and when you click 9n ok it downloads the dap debugger and update correctly the dap server command. It should work without some manual downlozd znd without some adjustment of the command.

    If you provide on npm registre or somewhere in github releases...you could write an installer.json

    I'll look into it next month. I'm busy these days.

  11. changed the title [-]DAP parameter passing[/-] [+]Preserve integer in DAP parameters[/+] on May 26, 2025
  12. added a commit that references this issue on May 26, 2025
    18b80aa
  13. added this to the 0.14.0 milestone on May 26, 2025
  14. self-assigned this
    on May 26, 2025
  15. added a commit that references this issue on May 26, 2025
    142c10c
  16. angelozerr commented on May 26, 2025

    @angelozerr
    Contributor
  17. added a commit that references this issue on May 26, 2025
    656ff4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdap

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions