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

Console output is not appearing in the Debug Console if using the HotReloading package #9

Open
kuglee opened this issue Jan 22, 2023 · 6 comments

Comments

@kuglee
Copy link

kuglee commented Jan 22, 2023

Hi,

Thanks for this extension, it works great.
One issue I've found is that the console output is not appearing in the Debug Console if using the HotReloading package. It is only written to the /tmp-ios-xxxx-stdout and /tmp-ios-xxxx-stderr.

It works fine in the Xcode console.

Here is an example project with HotReloading configured: https://github.com/nisargjhaveri/vscode-ios-debug

@nisargjhaveri
Copy link
Owner

@kuglee, thanks for reporting this.

Could you please mention some more concrete steps to reproduce this? It'll help me test. Also, the example project link seems to be wrong, it is just pointing to this project itself.

@kuglee
Copy link
Author

kuglee commented Jan 24, 2023

Sorry, here's an example I made:
https://github.com/kuglee/new

If you start the "Debug new Simulator" configuration, you'll see the issue. The app prints "hello" when it launches, but it only appears in the stdout file not on the Debug Console.

out

@nisargjhaveri
Copy link
Owner

Thanks for the info. I tried and I am able to see the logs as expected, including "HotReloading available ..." and "hello".

Can you please check and mention the version numbers for "iOS Debug" and "CodeLLDB" plugins?

I don't really understand why it'd not appear, especially since the logs are available in the ios-*-stdout file. We're using the logs.py script to get the output from the file to the debug console.

You can try these two things.

  1. Does output appear in the debug console for any other projects without HotReloading? Maybe try out the Sample App here
  2. If it does not, try manually including the logs.py in standalone lldb and see it that works.
    • Start commandline lldb client by running lldb
    • Run command script import logs.py in lldb prompt
    • Create a temp file somewhere and run follow <path/to/temp/file>
    • Write something in the temp file from another terminal and see if that appears in the lldb console.

Findings from these may help us find a solution.

@kuglee
Copy link
Author

kuglee commented Jan 24, 2023

That's really strange.

I've tried the Sample App and it printed to the Debug Console just fine. After that I added the HotRealoading package and it stopped printing to the Console.
2

I've had to change task to build the Sample App scheme because otherwise xcodebuild could build the project. But then I tried to build the original without the HotReloading package with the Sample App scheme and it again printed to the Console so it didn't affect anything.
4

I'll try to investigate further.

@markst
Copy link

markst commented Mar 20, 2023

Seems to be the same case with the example project here: https://github.com/markst/hotreloading-vscode-ios

@yushihang
Copy link
Contributor

#22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants