-
Notifications
You must be signed in to change notification settings - Fork 231
Developer console #255
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
Merged
vplentinax
merged 11 commits into
javascript-tutorial:master
from
EzequielCaste:devTools-translation
Jun 30, 2020
Merged
Developer console #255
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4da8870
traducción devtools
EzequielCaste f0b33ab
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste 7f7b046
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste 526fc47
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste 1a835fc
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste 5cbc3a5
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste 7bf42b5
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste ba3a255
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste ab1d97c
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste a912056
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste 558c24b
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCaste File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,64 +1,64 @@ | ||
| # Developer console | ||
| # Consola de desarrollador | ||
|
|
||
| Code is prone to errors. You will quite likely make errors... Oh, what am I talking about? You are *absolutely* going to make errors, at least if you're a human, not a [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)). | ||
| El código es propenso a errores. Es muy probable que cometas errores ... Oh, ¿de qué estoy hablando? Vas a *absolutamente* cometer errores, al menos si eres un humano, no un [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)). | ||
|
|
||
| But in the browser, users don't see errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it. | ||
| Pero en el navegador, por defecto los usuarios no ven errores. Entonces, si algo sale mal en el script, no veremos lo que está roto y no podemos arreglarlo. | ||
|
|
||
| To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers. | ||
| Para ver los errores y obtener mucha otra información útil sobre los scripts, se han incorporado "herramientas de desarrollo" en los navegadores. | ||
|
|
||
| Most developers lean towards Chrome or Firefox for development because those browsers have the best developer tools. Other browsers also provide developer tools, sometimes with special features, but are usually playing "catch-up" to Chrome or Firefox. So most developers have a "favorite" browser and switch to others if a problem is browser-specific. | ||
| La mayoría de los desarrolladores se inclinan por Chrome o Firefox para el desarrollo porque esos navegadores tienen las mejores herramientas para desarrolladores. Otros navegadores también proporcionan herramientas de desarrollo, a veces con características especiales, pero generalmente están jugando a ponerse al día con Chrome o Firefox. Por lo tanto, la mayoría de los desarrolladores tienen un navegador "favorito" y cambian a otros si un problema es específico del navegador. | ||
|
|
||
| Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands. | ||
| Las herramientas de desarrollo son potentes; Tienen muchas características. Para comenzar, aprenderemos cómo abrirlas, observar errores y ejecutar comandos JavaScript. | ||
|
|
||
| ## Google Chrome | ||
|
|
||
| Open the page [bug.html](bug.html). | ||
| Abre la página [bug.html](bug.html). | ||
|
|
||
| There's an error in the JavaScript code on it. It's hidden from a regular visitor's eyes, so let's open developer tools to see it. | ||
| Hay un error en el código JavaScript dentro de la página. Está oculto a los ojos de un visitante regular, así que abramos las herramientas de desarrollador para verlo. | ||
|
|
||
| Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`. | ||
| Presione la tecla `F12` o, si está en Mac, entonces la tecla`: Cmd + Opt + J`. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The developer tools will open on the Console tab by default. | ||
| Las herramientas de desarrollador se abrirán en la pestaña Consola de forma predeterminada. | ||
|
|
||
| It looks somewhat like this: | ||
| Se ve algo así: | ||
|
|
||
|  | ||
|
|
||
| The exact look of developer tools depends on your version of Chrome. It changes from time to time but should be similar. | ||
| El aspecto exacto de las herramientas de desarrollador depende de su versión de Chrome. Cambia de vez en cuando, pero debería ser similar. | ||
|
|
||
| - Here we can see the red-colored error message. In this case, the script contains an unknown "lalala" command. | ||
| - On the right, there is a clickable link to the source `bug.html:12` with the line number where the error has occurred. | ||
| - Aquí podemos ver el mensaje de error de color rojo. En este caso, el script contiene un comando desconocido "lalala". | ||
| - A la derecha, hay un enlace en el que se puede hacer clic en la fuente `bug.html: 12` con el número de línea donde se produjo el error. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Below the error message, there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands. Press `key:Enter` to run them (`key:Shift+Enter` to input multi-line commands). | ||
| Debajo del mensaje de error, hay un símbolo azul `>`. Marca una "línea de comando" donde podemos escribir comandos JavaScript. Presione la tecla `: Enter` para ejecutarlos (tecla`: Shift + Enter` para ingresar comandos de varias líneas). | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Now we can see errors, and that's enough for a start. We'll come back to developer tools later and cover debugging more in-depth in the chapter <info:debugging-chrome>. | ||
| Ahora podemos ver errores, y eso es suficiente para empezar. Volveremos a las herramientas de desarrollador más adelante y cubriremos la depuración más en profundidad en el capítulo <info: debugging-chrome>. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ## Firefox, Edge, and others | ||
| ## Firefox, Edge, y otros | ||
|
|
||
| Most other browsers use `key:F12` to open developer tools. | ||
| La mayoría de los otros navegadores usan `tecla: F12` para abrir herramientas de desarrollador. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The look & feel of them is quite similar. Once you know how to use one of these tools (you can start with Chrome), you can easily switch to another. | ||
| La apariencia de ellos es bastante similar. Una vez que sepa cómo usar una de estas herramientas (puede comenzar con Chrome), puede cambiar fácilmente a otra. | ||
|
|
||
| ## Safari | ||
|
|
||
| Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first. | ||
| Safari (navegador Mac, no compatible con Windows/Linux) es un poco especial aquí. Necesitamos habilitar primero el "Menú de desarrollo". | ||
|
|
||
| Open Preferences and go to the "Advanced" pane. There's a checkbox at the bottom: | ||
| Abra Preferencias y vaya al panel "Avanzado". Hay una casilla de verificación en la parte inferior: | ||
|
|
||
|  | ||
|
|
||
| Now `key:Cmd+Opt+C` can toggle the console. Also, note that the new top menu item named "Develop" has appeared. It has many commands and options. | ||
| Ahora la tecla: `Cmd + Opt + C` puede alternar la consola. Además, tenga en cuenta que ha aparecido el nuevo elemento del menú superior denominado "Desarrollar". Tiene muchos comandos y opciones. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Multi-line input | ||
| ## Entrada multilínea | ||
|
|
||
| Usually, when we put a line of code into the console, and then press `key:Enter`, it executes. | ||
| Por lo general, cuando ponemos una línea de código en la consola y luego presionamos la tecla `Enter`, se ejecuta. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To insert multiple lines, press `key:Shift+Enter`. | ||
| Para insertar varias líneas, presione la tecla: `Shift + Enter`. | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Summary | ||
| ## Resumen | ||
|
|
||
| - Developer tools allow us to see errors, run commands, examine variables, and much more. | ||
| - They can be opened with `key:F12` for most browsers on Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first). | ||
| - Las herramientas para desarrolladores nos permiten ver errores, ejecutar comandos, examinar variables y mucho más. | ||
| - Se pueden abrir con `tecla: F12` para la mayoría de los navegadores en Windows. Chrome para Mac necesita la tecla `Cmd + Opt + J`, Safari: tecla `Cmd + Opt + C` (primero debe habilitarse). | ||
EzequielCaste marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Now we have the environment ready. In the next section, we'll get down to JavaScript. | ||
| Ahora tenemos el entorno listo. En la siguiente sección, nos abocaremos a JavaScript. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.