ERROR [pyrevit.routes.server.router] Route pattern is invalid: /posts/<int:uiapp>

That error is intentional if you have the dev extension installed. See Error on Launch - pyRevit DevTools - #4 by onomou

Regarding using VS Code, Erik has a short tutorial here: How to create Revit API Stubs for Autocomplete with pyRevit