From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- files/th/tools/webide/index.html | 42 ------ files/th/tools/webide/troubleshooting/index.html | 117 --------------- .../index.html" | 161 --------------------- .../index.html" | 43 ------ .../index.html" | 26 ---- 5 files changed, 389 deletions(-) delete mode 100644 files/th/tools/webide/index.html delete mode 100644 files/th/tools/webide/troubleshooting/index.html delete mode 100644 "files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\225\340\270\261\340\271\211\340\270\207\340\270\204\340\271\210\340\270\262\340\270\243\340\270\261\340\270\231\340\271\204\340\270\227\340\270\241\340\271\214/index.html" delete mode 100644 "files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\227\340\271\215\340\270\262\340\270\207\340\270\262\340\270\231\340\270\243\340\271\210\340\270\247\340\270\241\340\270\201\340\270\261\340\270\232\340\270\204\340\270\255\340\270\243\340\271\214\340\271\202\340\270\224\340\270\247\340\270\262\340\271\201\340\270\255\340\270\236\340\270\236\340\270\245\340\270\264\340\271\200\340\270\204\340\270\212\340\270\261\340\271\210\340\270\231\340\271\203\340\270\231_webide/index.html" delete mode 100644 "files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\271\200\340\270\233\340\270\264\340\270\224_webide/index.html" (limited to 'files/th/tools') diff --git a/files/th/tools/webide/index.html b/files/th/tools/webide/index.html deleted file mode 100644 index 13acbd9330..0000000000 --- a/files/th/tools/webide/index.html +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: WebIDE -slug: Tools/WebIDE -tags: - - Apps - - B2G - - Debugging - - Firefox OS - - NeedsTranslation - - TopicStub - - WebIDE - - tool -translation_of: Archive/WebIDE ---- -
-

WebIDE ช่วยให้คุณสามารถสร้าง, แก้ไข, ทำงานและการแก้ปัญหาแอพพลิเคชั่นเว็บ โดยใช้ Firefox OS Simulator หรืออุปกรณ์ Firefox OS จริง

- -

นอกจากนี้ยังช่วยให้คุณสามารถเชื่อมต่อ Firefox Developer Tools ไปยังเบราว์เซอร์อื่น ๆ รวมทั้ง Firefox สำหรับ Android, Chrome บน Android, และ Safari บน iOS
- โปรดดู หน้า Remote Debugging สำหรับคำแนะนำเกี่ยวกับวิธีการเชื่อมต่อกับเบราว์เซอร์ที่เฉพาะเจาะจง

-
- -

With WebIDE, you first set up one or more runtimes. A runtime is an environment in which you'll run and debug the app. A runtime could be a Firefox OS device connected to the desktop over USB (or over Wi-Fi since Firefox 39), or it could be a Firefox OS Simulator installed on the desktop itself.

- -

Next, you create an app, or open an existing app. If you're creating a new app you can start with a template that includes the directory structure and the minimum boilerplate you need to get started, or a more complete template that shows how to use a privileged API. WebIDE shows your app's files in a tree, and you can edit and save them using a built-in source editor. Of course, you don't have to use the built-in editor: you can develop your app entirely outside WebIDE, and only use it for debugging.

- -

Finally, you can install the app in one of the runtimes and run it. You can then open the usual suite of developer tools - the Inspector, Console, JavaScript Debugger and so on - to examine and modify the running app.

- -
-
-
การเปิด WebIDE
-
วิธีการเปิด WebIDE จากภายใน Firefox
-
การตั้งค่ารันไทม์
-
วิธีการเชื่อมต่อกับรันไทม์ในที่ที่คุณสามารถติดตั้งแอพพลิเคชั่นรวมทั้งอุปกรณ์ Firefox OS, Firefox OS Simulator, และ Firefox สำหรับ Android
-
การสร้างและการแก้ไขแอพพลิเคชั่น
-
วิธีการ สร้าง เปิด และพัฒนาแอพพลิเคชั่น โดยใช้ WebIDE
-
การทำงานและการแก้จุดบกพร่องแอพพลิเคชั่น
-
วิธีการติดตั้งแอพพลิเคชั่นรันไทม์และแก้ปัญหาโดยใช้ Firefox เครื่องมือสำหรับนักพัฒนา
-
การทำงานร่วมกับคอร์โดวาแอพพลิเคชั่นใน WebIDE
-
จาก Firefox 39, คุณสามารถแก้ไขและการแก้ปัญหาคอร์โดวาแอพพลิเคชั่นที่ใช้ WebIDE
-
การแก้ไขปัญหา
-
ความช่วยเหลือสำหรับปัญหาเกี่ยวกับ WebIDE โดยเฉพาะอย่างยิ่งปัญหาการเชื่อมต่อกับรันไทม์
-
diff --git a/files/th/tools/webide/troubleshooting/index.html b/files/th/tools/webide/troubleshooting/index.html deleted file mode 100644 index d6dd5fd51c..0000000000 --- a/files/th/tools/webide/troubleshooting/index.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: การแก้ไขปัญหา WebIDE -slug: Tools/WebIDE/Troubleshooting -translation_of: Archive/WebIDE/Troubleshooting ---- -

การเชื่อมต่ออุปกรณ์ Firefox OS ผ่าน USB

- -

ถ้าคุณกำลังพยายามที่จะเชื่อมต่ออุปกรณ์ Firefox OS เพื่อ WebIDE และ มันไม่แสดงขึ้น นี่คือบางสิ่งที่คุณสามารถลองทำ:

- - - -

การเชื่อมต่ออุปกรณ์ Firefox OS ผ่าน Wi-Fi

- - - -

การเชื่อมต่อกับ Firefox สำหรับ Android

- -

หากคุณกำลังพยายามเชื่อมต่อกับอินสแตนซ์ Firefox ที่รันบน Android OS และไม่ปรากฏขึ้นคุณสามารถลองทำสิ่งต่างๆต่อไปนี้:

- - - -

การเชื่อมต่อกับเบราว์เซอร์อื่น ๆ (Chrome, Safari)

- -

WebIDE ใช้Valence (ก่อนหน้านี้คือ Firefox Tools Adapter)เพื่อเข้าถึงเบราว์เซอร์อื่นเช่น Chrome และ Safari 

- -

หากคุณกำลังมีปัญหาในการเชื่อมต่อกับเบราว์เซอร์อื่น ๆ เหล่านี้ให้ตรวจสอบขั้นตอนการติดตั้งและบันทึกอื่น ๆ สำหรับเบราว์เซอร์ผู้ที่อยู่ในหน้า Valence

- -

ไม่สามารถแก้ปัญหาบางแอพพลิเคชั่น(debug)

- -

หากคุณพบว่าคุณไม่สามารถแก้ปัญหาแอปพลิเคชันที่ได้รับการรับรองแอปที่ติดตั้งหรือแอปที่ติดตั้งไว้ในอุปกรณ์จริงแล้วคุณอาจกำลังดูนโยบายด้านความปลอดภัยที่มีสิทธิ์ จำกัด ของ WebIDE หากต้องการข้อมูลเพิ่มเติมโปรดดูที่ส่วนที่เกี่ยวกับการแก้จุดบกพร่องไม่ จำกัด แอป (รวมถึงแอพพลิเคได้รับการรับรองกระบวนการหลัก ฯลฯ )

- -

ไม่สามารถโหลดรายชื่อโครงการ

- -

หากคุณเปิด WebIDE ใน Firefox เวอร์ชันใดเวอร์ชันหนึ่งแล้วปรับลดรุ่นเป็น Firefox เวอร์ชันก่อนหน้าด้วยโปรไฟล์เดียวกันคุณอาจเห็นข้อผิดพลาด "Unable to load project list" เมื่อเปิด WebIDE ในเวอร์ชัน Firefox ก่อนหน้านี้

- -

ซึ่งอาจเกิดขึ้นได้เมื่อระบบจัดเก็บข้อมูลที่ WebIDE ใช้ ( IndexedDB ) จำเป็นต้องย้ายหรือปรับโครงสร้างไฟล์ภายในสำหรับเวอร์ชัน Firefox รุ่นใหม่ รายการโครงการจะกลายเป็นเวอร์ชันล่าสุดของ Firefox ที่ไม่สามารถเข้าถึงได้

- -

ไม่มีข้อมูลสูญหาย แต่คุณจะต้องใช้ Firefox รุ่นล่าสุดที่ใช้กับโปรไฟล์ของคุณเพื่อรับรายชื่อโครงการ

- -

ถ้าคุณต้องการใช้ Firefox เวอร์ชันเก่ากว่านี้คุณสามารถลองลบรายการโครงการตามวิธีการต่อไปนี้ได้ แต่นี่ไม่ได้รับการสนับสนุนและอาจส่งผลต่อปัญหาหรือการสูญหายของข้อมูลเพิ่มเติม:

- -
    -
  1. ปิด Firefox
  2. -
  3. ค้นหาไดเรกทอรีโปรไฟล์ Firefox ของคุณ
  4. -
  5. ค้นหาstorageโฟลเดอร์ภายในไดเร็กทอรีโปรไฟล์
  6. -
  7. ภายใต้บางส่วนของต้นไม้แฟ้มนี้ควรมีไฟล์และ / หรือไดเรกทอรีที่ขึ้นต้นด้วย4268914080AsptpcPerjo(ชื่อที่ถูกแฮชของฐานข้อมูล)
  8. -
  9. ลบไฟล์และไดเรกทอรีดังกล่าวออก
  10. -
  11. เริ่ม Firefox และ WebIDE อีกครั้ง
  12. -
- -

เปิดใช้งานการเข้าสู่ระบบ

- -

นอกจากนี้คุณยังสามารถเปิดใช้งานการบันทึกข้อมูลแบบ verbose เพื่อรวบรวมการวินิจฉัย:

- -
    -
  1. เปิดabout: configและเพิ่มการตั้งค่าใหม่ที่เรียกว่าextensions.adbhelper@mozilla.org.sdk.console.logLevelมีค่าสตริงallและการตั้งค่าไปextensions.adbhelper@mozilla.org.debugtrue
  2. -
  3. ในAdd-on Managerให้ปิดใช้งานและเปิดใช้งานAdd-onของ ADB Helper ใหม่
  4. -
  5. เปิดเบราว์เซอร์คอนโซลadbและตอนนี้คุณจะเห็นข้อความที่คอนโซลหน้าด้วย ถ้าข้อความไม่ได้มีความหมายอะไรกับคุณขอความช่วยเหลือ
  6. -
- -

ต้องการความช่วยเหลือ

- -

ไปที่ #devtools room on IRC และเราจะพยายามที่จะช่วย

diff --git "a/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\225\340\270\261\340\271\211\340\270\207\340\270\204\340\271\210\340\270\262\340\270\243\340\270\261\340\270\231\340\271\204\340\270\227\340\270\241\340\271\214/index.html" "b/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\225\340\270\261\340\271\211\340\270\207\340\270\204\340\271\210\340\270\262\340\270\243\340\270\261\340\270\231\340\271\204\340\270\227\340\270\241\340\271\214/index.html" deleted file mode 100644 index cbc902734e..0000000000 --- "a/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\225\340\270\261\340\271\211\340\270\207\340\270\204\340\271\210\340\270\262\340\270\243\340\270\261\340\270\231\340\271\204\340\270\227\340\270\241\340\271\214/index.html" +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: การตั้งค่ารันไทม์ -slug: Tools/WebIDE/การตั้งค่ารันไทม์ -translation_of: Archive/WebIDE/Setting_up_runtimes ---- -

A runtime is an environment in which you'll run and debug the app. A runtime could be a Firefox OS device connected to the desktop over USB, it could be a Firefox OS Simulator installed on the desktop itself, or it could be another instance of Firefox Desktop.

- -

Under the "Select Runtime" dropdown, runtimes are grouped into four types:

- -
-
USB DEVICES
-
Firefox OS devices connected over USB. From Firefox 36 this also gets you connected to Firefox for Android over USB.
-
WI-FI DEVICES
-
Firefox OS devices connected over Wi-Fi. New in Firefox 39.
-
SIMULATORS
-
Instances of the Firefox OS Simulator that you've installed.
-
OTHER
-
Remote runtimes to connect WebIDE to an arbitrary host and port. If you have the Valence add-on installed, this section will also list the additional runtimes it enables.
-
- -

The rest of this section describes how you can add some runtimes.

- -

การเชื่อมต่ออุปกรณ์ Firefox OS

- -

If you have a sufficiently recent version of Firefox and Firefox OS, you can connect the Firefox OS device over WiFi. Otherwise, you must connect over USB.

- -

การเชื่อมต่อผ่าน USB

- -

Before you can connect a Firefox OS device, there's some setup you have to go through:

- - - -
-

เฉพาะ Linux:

- - -
- -
-

เฉพาะ Windows:

- - -
- -

If there are any other Android devices connected to your computer, disconnect them. Now connect the device to the computer using USB. You should see the device appear under "USB DEVICES":

- -

- -

If you don't see your device, see the Troubleshooting page.

- -

การเชื่อมต่อผ่าน WiFi

- -

To connect over WiFi, you need:

- - - -

This doesn't use ADB at all, and is therefore likely to be more reliable than the USB method.

- -

Enable WiFi debugging

- -

First, enable WiFi debugging on the Firefox OS device.

- -
    -
  1. Open Developer Settings on the device (Settings -> Developer)
  2. -
  3. Check "DevTools via Wi-Fi"
  4. -
  5. Edit the device name if desired
  6. -
- -

- -

Select the device

- -

In WebIDE, click the "Select Runtime" menu. You should see a section labeled "Wi-Fi Devices", and your device should appear under it:

- -

Select your device.

- -

Authenticate

- -

Next, in the WebIDE you'll see a prompt with a QR code:

- -

On the device, you'll see a connection prompt giving you options to "Scan" or "Scan and Remember". Choose one of the options and scan the QR code. Now WebIDE should connect to the device, and the device icon next to "Select Runtime" should turn blue to indicate this.

- -

The QR code scanner can be a bit frustrating at the moment, as real devices appear to capture a very low resolution picture. Bug 1145772 aims to improve this soon. If you have trouble with this, try scanning with a few different orientations.

- -

If you chose "Scan and Remember, then you won't have to scan the code again the next time you connect your computer to this device.

- -

การเชื่อมต่อกับ Firefox สำหรับ Android

- -

From Firefox 36 onwards Android devices connected over USB and running Firefox for Android appear as a runtime under "USB devices". See the article on connecting to Firefox for Android from WebIDE.

- -

Before Firefox 36, you can connect to Firefox for Android without using WebIDE at all, or can use WebIDE by setting up a custom remote runtime.

- -

Adding a Simulator

- -

The Firefox OS Simulator is a version of the higher layers of Firefox OS that simulates a Firefox OS device, but runs on the desktop. It runs in a window the same size as a Firefox OS device, includes the Firefox OS user interface and built-in apps, and simulates many of the Firefox OS device APIs.

- -

This means that in many cases, you don't need a real device to test and debug your app.

- -

The Simulator doesn't ship inside Firefox but as a Firefox add-on. If you click "Install Simulator" in the Runtimes dropdown menu, you will go to a page from which you can install Simulators for various versions of Firefox OS.

- -

You can install as many as you like. Be patient, though: the Simulator may take a few minutes to download. Once you've installed some Simulators you can close this "Extra Components" window, and the Simulators you've installed appear as options in the Runtimes dropdown menu:

- -

To learn more about the Simulator, see its documentation page.

- -

Other runtimes

- -

Remote runtime

- -

With a remote runtime you can use an arbitrary hostname and port to connect to the remote device.

- -

Under the hood, Firefox OS devices and Android devices connect to the desktop using a program called the Android Debug Bridge, or ADB. By default, WebIDE uses an add-on called the ADB Helper: this simplifies the process for you by installing ADB and setting up port forwarding so the Firefox desktop tools can exchange messages with the device.

- -

This is convenient in most cases, but sometimes you might want to use ADB outside of WebIDE: for example, you might be running ADB directly from the command line. In that case you'll connect to the device by specifying a host and port using the adb forward command (example: adb forward tcp:6000 localfilesystem:/data/local/debugger-socket).
-
- If you then want to use WebIDE to connect as well, you should disable the ADB Helper add-on and connect WebIDE using the Custom runtime option, entering the host and port that you passed to adb forward (example: localhost:6000).

- -

Also, before Firefox 36, the ADB Helper does not yet support connecting to Firefox for Android, so if you want to connect WebIDE to Firefox for Android, you'll need to set up your own port forwarding and use a custom runtime. See more about connecting to Firefox for Android using ADB prior to Firefox 36.

- -

Valence-enabled runtimes

- -

If you have the Valence add-on installed, you'll see three additional runtimes:

- - - -

For instructions on how to connect to these runtimes, see the relevant entry in the Remote Debugging page.

- -

Selecting a runtime

- -

Once you've set up a runtime you can select it using the "Select Runtime" menu.

- - - -

Now the "play" button in the center of the WebIDE toolbar is enabled: click it to install and run the app in the selected runtime.

diff --git "a/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\227\340\271\215\340\270\262\340\270\207\340\270\262\340\270\231\340\270\243\340\271\210\340\270\247\340\270\241\340\270\201\340\270\261\340\270\232\340\270\204\340\270\255\340\270\243\340\271\214\340\271\202\340\270\224\340\270\247\340\270\262\340\271\201\340\270\255\340\270\236\340\270\236\340\270\245\340\270\264\340\271\200\340\270\204\340\270\212\340\270\261\340\271\210\340\270\231\340\271\203\340\270\231_webide/index.html" "b/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\227\340\271\215\340\270\262\340\270\207\340\270\262\340\270\231\340\270\243\340\271\210\340\270\247\340\270\241\340\270\201\340\270\261\340\270\232\340\270\204\340\270\255\340\270\243\340\271\214\340\271\202\340\270\224\340\270\247\340\270\262\340\271\201\340\270\255\340\270\236\340\270\236\340\270\245\340\270\264\340\271\200\340\270\204\340\270\212\340\270\261\340\271\210\340\270\231\340\271\203\340\270\231_webide/index.html" deleted file mode 100644 index a4b5dbc4bc..0000000000 --- "a/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\270\227\340\271\215\340\270\262\340\270\207\340\270\262\340\270\231\340\270\243\340\271\210\340\270\247\340\270\241\340\270\201\340\270\261\340\270\232\340\270\204\340\270\255\340\270\243\340\271\214\340\271\202\340\270\224\340\270\247\340\270\262\340\271\201\340\270\255\340\270\236\340\270\236\340\270\245\340\270\264\340\271\200\340\270\204\340\270\212\340\270\261\340\271\210\340\270\231\340\271\203\340\270\231_webide/index.html" +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: การทำงานร่วมกับคอร์โดวาแอพพลิเคชั่นใน WebIDE -slug: Tools/WebIDE/การทํางานร่วมกับคอร์โดวาแอพพลิเคชั่นใน_WebIDE -translation_of: Archive/WebIDE/Working_with_Cordova_apps_in_WebIDE ---- -
-

New in Firefox 39.

-
- -

Apache Cordova ช่วยให้คุณสามารถเขียนแอพพลิเคชั่นโดยใช้ HTML, JavaScript และ CSS และแล้วสร้างรุ่นพื้นเมืองของมันสำหรับแพลตฟอร์มโทรศัพท์มือถือเช่น iOS และ Android
- โดยคอร์โดวา คุณยังสามารถสร้างรุ่น app ของคุณสำหรับ Firefox OS

- -

From Firefox 39 onwards, WebIDE directly supports Cordova apps: this means that  you can edit Cordova apps in WebIDE, and WebIDE takes care of generating the Firefox OS version for you.

- -

First, create a Cordova app, as you normally would:

- - - - - - - -

Next:

- - - -

Now you can edit the app as a Cordova app, and whenever you run the app, WebIDE takes care of generating the Firefox OS version behind the scenes. WebIDE also regenerates the Firefox OS version whenever you make any changes that would affect your app's manifest, so it can perform manifest validation.

diff --git "a/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\271\200\340\270\233\340\270\264\340\270\224_webide/index.html" "b/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\271\200\340\270\233\340\270\264\340\270\224_webide/index.html" deleted file mode 100644 index 709cde4ece..0000000000 --- "a/files/th/tools/webide/\340\270\201\340\270\262\340\270\243\340\271\200\340\270\233\340\270\264\340\270\224_webide/index.html" +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: การเปิด WebIDE -slug: Tools/WebIDE/การเปิด_WebIDE -translation_of: Archive/WebIDE/Opening_WebIDE ---- -

มีสามวิธีที่จะเปิด WebIDE ได้แก่:

- - - -

- -

นี่คือสิ่งที่ดูเหมือน WebIDE:The dropdown on the left labeled Open App lets you open existing apps or create new ones. The dropdown on the right labeled Select Runtime lets you select a runtime or set up a new runtime.

- -

The buttons in the middle run, stop, and debug the app: they are only enabled when you have opened an app and selected a runtime.

- -

You can change the font size throughout WebIDE using the standard keyboard shortcuts (use Command instead of Control on OS X):

- - -- cgit v1.2.3-54-g00ecf