Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
4da8870
traducción devtools
EzequielCasteJun 15, 2020
f0b33ab
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 28, 2020
7f7b046
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 28, 2020
526fc47
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 28, 2020
1a835fc
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
5cbc3a5
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
7bf42b5
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
ba3a255
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
ab1d97c
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
a912056
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
558c24b
Update 1-js/01-getting-started/4-devtools/article.md
EzequielCasteJun 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions1-js/01-getting-started/4-devtools/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff 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? *Definitivamente* vas a 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 towardsChromeor Firefoxfor 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" toChromeor 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 porChromeo Firefoxpara 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 conChromeo 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 errorin theJavaScriptcode on it. It's hidden from a regular visitor's eyes, so let's open developer tools to see it.
Hay un erroren el códigoJavaScriptdentro 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 `key:F12`o, si está en Mac,entonces combine `key:Cmd+Opt+J`.

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í:

![chrome](chrome.png)

The exact look of developer tools depends on your version ofChrome.It changes from time to time but should be similar.
El aspecto exacto de las herramientas de desarrollador depende de su versión deChrome.Cambia de vez en cuando, pero debería ser similar.

-Here we can see the red-colored errormessage. In this case, the scriptcontains 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 errorde color rojo. En este caso, el scriptcontiene 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.

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 `key:Enter`para ejecutarlos (combine`key:Shift+Enter`para ingresar comandos de varias líneas).

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>.


## 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`key:F12`para abrir herramientas de desarrollador.

The look & feel of them is quitesimilar.Once you know how to use one of these tools (you can start withChrome),you can easily switch to another.
La apariencia de ellos es bastantesimilar.Una vez que sepa cómo usar una de estas herramientas (puede comenzar conChrome),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:

![safari](safari.png)

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 combine`key:Cmd+Opt+C`para alternar a consola. Además, tenga en cuenta que ha aparecido el nuevo elemento del menú superior denominado "Desarrollar". Tiene muchos comandos y opciones.

##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`key:Enter`,se ejecuta.

To insert multiple lines, press `key:Shift+Enter`.
Para insertar varias líneas, presione la combinación `key:Shift+Enter`.

##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 onWindows. Chromefor Macneeds`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`key:F12`para la mayoría de los navegadores enWindows. Chromepara Macnecesita la combinación`key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (primero debe habilitarse).

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.
2 changes: 1 addition & 1 deletion1-js/01-getting-started/4-devtools/bug.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

<body>

There is anerrorin the scripton this page.
Hay unerroren el scriptde ésta página.
<script>
lalala
</script>
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp