Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to debug after updating VS code #132

Open
longton95 opened this issue Sep 12, 2019 · 10 comments
Open

Unable to debug after updating VS code #132

longton95 opened this issue Sep 12, 2019 · 10 comments
Labels
bug Something isn't working

Comments

@longton95
Copy link
Contributor

longton95 commented Sep 12, 2019

Describe the Bug

A customer updated to the latest VS code version (1.38.1) and is now unable to debug on iOS and Android after the update writing here to track issue;

Tried uninstalling the VSCode extension, then reloading, and it still doesn't work. The behavior is that:

  • Android: Compile for debugger and when the app starts, it starts the app and paused the execution immediately, you would have to click the green play arrow in the debug toolbar to start the app. Now it starts the app right away and doesn't stop on any set breakpoints.
  • IOS: Compile for debugger (on device), start the app, immediately you receive an error (attached)
    image
  • iOS : Compile for debugger (simulator), sim launches, immediately, you get this error (attached)
    image (1)

Your Environment

Software Version
Titanium SDK 8.0.1.GA
Appcelerator CLI 7.1.1
VS Code 1.38.1
vscode-titanium 0.5.0
@longton95 longton95 added the bug Something isn't working label Sep 12, 2019
@Sean-Brown-Digi
Copy link

I'm also getting the "Unable to discover app" error

@Sean-Brown-Digi
Copy link

@longton95 I was able to get this to work if I just re-run the debugger (without closing the simulator)

@Sean-Brown-Digi
Copy link

It worked perfectly for my Android tablet, no need to relaunch

@rlustemberg
Copy link

Having the same issue in iOS

@bt-hellotess
Copy link

Same problem here.

Appcelerator Command-Line Interface, version 7.1.1-5

Operating System
Name = Mac OS X
Version = 10.15.1
Architecture = 64bit

CPUs = 4

Memory = 8589934592

Node.js
Node.js Version = 8.12.0
npm Version = 6.4.1

Titanium CLI
CLI Version = 5.2.1

Titanium SDK
SDK Version = 7.4.1.GA

@ewanharris
Copy link
Collaborator

@Sean-Brown-Digi, we've been trying to tune the time we wait before we error out with Unable to discover app. If it works for you with the simulator launched already then I believe you may just be hitting the limit of the time we wait. Maybe we need to make that time configurable.

@rlustemberg, could you elaborate on what you're seeing? Titanium SDK version, target (simulator or device).

@bogdan-hash, same for you. I'm guessing SDK 7.4.1.GA (I don't believe we've tested this version). But what platform, and target are you debugging on?

@longton95, do you remember who you reported this issue for? Any ideas if they're still seeing the issue?

@bt-hellotess
Copy link

bt-hellotess commented Nov 18, 2019

@ewanharris
"platform": "ios",
"target": "simulator"
From time to time it works if i keep the simulator open (but probably once out of ten attempts). But it is not usable that way. I tried a lot of times to see what i'm doing different when it works, but did't do anything special. I think me and @Sean-Brown-Digi have a similar issue.
And yes, i'm using SDK 7.4.1.GA, I have mentioned in the first comment.

When it fails, debugger just stop loading my resources after loaded half of them (then the error occur).
When it works, all files are loaded correctly.

In both cases simulator works fine.

@Sean-Brown-Digi
Copy link

@ewanharris making that timeout option configurable sounds like a decent idea. Is this something you're able to test with a real iOS device? I'm noticing that it never works on a real device but the simulator works pretty reliably after re-launching.

@ewanharris
Copy link
Collaborator

The _stack error looks to be coming from some issue with remotedebug-ios-webkit-adapter/ios-webkit-debug-proxy erroring during startup. I've split that out to #161.

@Sean-Brown-Digi from my testing I'm able to debug KitchenSink-v2 on an iOS 13 device, and an iOS 12.1 device. It might be that you need to reinstall ios-webkit-debug-proxy and the related components to get debugging working on iOS 13 devices. You can do that via running the below commands.

brew uninstall ios-webkit-debug-proxy libimobiledevice usbmuxd
brew install --HEAD usbmuxd
brew install --HEAD libimobiledevice
brew install --HEAD ios-webkit-debug-proxy

Do you want to give that a try and see if it works for you?

I'm totally not a fan of this though, basically when Apple changes things in JSCore people will have to more than likely reinstall ios-webkit-debug-proxy again to pick up those fixes. I'm looking to try improve the downstream package we use to avoid this, but I'll also think about whether we can add some better messaging in the extension around this.

@Sean-Brown-Digi
Copy link

That didn't work for me though it did take a little longer to fail. I wonder if it has to do with my default shell, which is set to "fish", for instance when I re-installed the packages I saw a lot of output like this:

==> libxml2
libxml2 is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libxml2 first in your PATH run:
  echo 'set -g fish_user_paths "/usr/local/opt/libxml2/bin" $fish_user_paths' >> ~/.config/fish/config.fish

For compilers to find libxml2 you may need to set:
  set -gx LDFLAGS "-L/usr/local/opt/libxml2/lib"
  set -gx CPPFLAGS "-I/usr/local/opt/libxml2/include"

For pkg-config to find libxml2 you may need to set:
  set -gx PKG_CONFIG_PATH "/usr/local/opt/libxml2/lib/pkgconfig"

I'm not sure if that means anything though. I checked out issue #161 and I'm not sure how you got that debug output but that looks like a useful place to start trying to debug the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants