Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Conversation

@Plamen5kov
Copy link
Contributor

@Plamen5kov Plamen5kov commented Oct 9, 2017

Update the getting started article to show the normal debugging flow, besides console log.

@Plamen5kov Plamen5kov requested a review from tsonevn October 9, 2017 13:45
@etabakov etabakov requested a review from tjvantoll October 9, 2017 14:05
Copy link
Contributor

@etabakov etabakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this section is getting messy. We have three ways to debug an application and we are showcasing the most primitive and least preferable one. Isn't it better to change the title of the current one to "Logging" and create a new section for debugging with Chrome Dev Tools?

@tjvantoll What do you think about this?

The default way of debugging a NativeScript application is by using the integration with Chrome. You can find more information on the actual steps [here](http://docs.nativescript.org/tooling/debugging).

**Visual Studio Code**
One of the preffered ways of debugging a NativeScript application is with the [NativeScript extension for Visual Studio Code](http://docs.nativescript.org/tooling/debugging#debugging-with-visual-studio-code).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preferred

There are three main paths you can take when you want to debug a NativeScript application:

**Chrome**
The default way of debugging a NativeScript application is by using the integration with Chrome. You can find more information on the actual steps [here](http://docs.nativescript.org/tooling/debugging).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry that you set readers up for failure by just linking to that page and not walking them through exactly how to use the Chrome Dev Tools. For example, the Chrome Dev Tools only work in iOS if you use the --chrome flag, and that fact is barely mentioned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be ok if you mention it after the console.log() example though, because then it’s kind of an aside for readers to check out when they’re ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tjvantoll I don't think we're setting anyone up for failure when we're pointing them to a specific article about debugging. The fact that ios debugging in chrome is working with the --chrome flag is one of the first things, mentioned in the article.
Furthermore, I don't think console.log is actual debugging. On this point, I think more like @etabakov : let's have a logging section, but not call console.log .. debugging.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having a different section eventually makes a lot of sense, but I’d be hesitant to add a section that just has two links.

You’ve convinced me that the wording you currently have is worth moving forward with. I just want a bit of text to transition from Chrome/VS Code into the console.log examples and 👍 from me.

Copy link
Contributor

@tjvantoll tjvantoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term I think this tutorial should actually walk the user through running the appropriate commands and teach them the Dev Tools with examples, as @etabakov suggests. The next iteration of the tutorial that Jen & I are thinking through now will almost certainly do that.

Until then I don’t mind mentioning these tools, but I’d kind of like this PR’s wording to be put after the console.log example—just because I think it’ll flow better. Right now it’s a bit weird to say, “here are the best two ways to debug your apps but we’re not going to use them”.

console.log() is basic, but it’s something the reader can do without installing something new, and without having to stop their app from running with Ctrl + C and learning a new debug command with a --chrome flag.

That’s my thoughts at least. If you just replace the sentences below with what you have here I think this should be good for now. (Also remember that there are two tutorials, so there’s a chapter-1.md file with this same wording.)

“The console.log() and console.dir() functions are two of the many tools available when debugging your NativeScript applications. You might want to try out step debugging as you move into more advanced development”

@Plamen5kov
Copy link
Contributor Author

Plamen5kov commented Oct 10, 2017

@tjvantoll I understand what you're saying, but here's what I see.
I go and look at the tutorial, which says that debugging === console.log and in the bottom, there's something about vs code extension, which I may or may not be using and not a word for real debugging on chrome and safari.
I suggest having a debugging section with a simple link to debugging article and logging section which suggests using console.log.

“here are the best two ways to debug your apps but we’re not going to use them”

On this concern: we can just say for the sake of understanding the flow of the application, we can use console.log, which won't be misleading IMO.

@tjvantoll
Copy link
Contributor

@Plamen5kov Ok that makes sense. I think as long as you add some wording that makes what you have in this PR flow into the console.log example we’ll be good.

So I’d add something like...

You’ll want to check out the Chrome Dev Tools and the Visual Studio debugger as you have the need to step through your JavaScript code or TypeScript code, but for the moment let’s look at how to do some simple logging in your apps.

@Plamen5kov Plamen5kov changed the title update article to include a more decend way of debugging update article to include a more natural way of debugging Oct 11, 2017
@tjvantoll
Copy link
Contributor

@Plamen5kov It’s “preferred” (two r s) 😉

Update that and 👍 from me on merging this in.

@Plamen5kov
Copy link
Contributor Author

my bad

@Plamen5kov Plamen5kov merged commit 849daf5 into master Oct 12, 2017
@Plamen5kov Plamen5kov deleted the plamen5kov/update-debug-info branch October 12, 2017 06:36
@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

5 participants