Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

  • Topic Author
  • Posted
    1 minute ago, Joep said:

    I programmed past 2 evenings with this VScode setup and uploading code to my HC3 and it works like a charm. Two things I found out:

     

    1. If I use a multi-root workspace then the lsp / intellisense is not working correctly. Like fibaro.getValue doesn't pop up the inline code example. Also the Quick App functions (crawled from the fibemu files, I think) are not always suggested. If I work from the fibemu folder (say fibemu/dev/main.lua) everything works. I think this is a VScode thing, but I can't find a setting to fix this.

     

    2. If I start debugging (F5) from a secondary file (not main.lua) the emulator starts but the QA does nothing. Very strange. I stays at running main:

     

    Please login or register to see this attachment.

     

    Nothing to worry about, I now symlink my second repository to fibemu/dev, but I wanted to notice this.

    Yes, the first "bug" I think is vscode or the lua language server.

     

    The second issue is that the emulator/fibemu starts to run your secondary file thinking it is the main, and usually there are just definitions and no actions... no QuickApp:onInit() to run etc. So it kind of looks like nothing happens in many cases...

    The emulator can be used to run non QuickApp code too (with all the QuickApp functions) and I use that a lot so I don't want to print some warning message either...

    What would be nice if there was some vscode setting that to point at the active file when running debug (like in ZeroBrane) so it always started to debug that file and not the one currently opened.

    Posted
    On 10/21/2024 at 10:18 AM, jgab said:

    The emulator can be used to run non QuickApp code too (with all the QuickApp functions) and I use that a lot so I don't want to print some warning message either...

    What would be nice if there was some vscode setting that to point at the active file when running debug (like in ZeroBrane) so it always started to debug that file and not the one currently opened.

     

    I tested by changing the launch.json task parameter from ${relativeFile} to ${relativeFileDirname}/main.lua. This works for me. :) Now it always launches the main.lua file when also edditing other files with a more complex QA.

     

  • Topic Author
  • Posted
    On 10/22/2024 at 11:06 AM, Joep said:

     

    I tested by changing the launch.json task parameter from ${relativeFile} to ${relativeFileDirname}/main.lua. This works for me. :) Now it always launches the main.lua file when also edditing other files with a more complex QA.

     

    Yes, but it would be nice to mark the current file in the UI and not need to change launch.json file.

    I usually run several "main"s, not named "main", while developing and having to edit a file to point to different places is too much work... However, if you have one focused project it can be worth it.

    • 3 weeks later...
  • Topic Author
  • Posted

    Ok, I updated a number of python libraries in requirements.txt - recommend that all users (MacOS or Windows) to redo pip install...

    • Thanks 1

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...